Recent

Author Topic: Eliminating empty strings in TStringList when reading from text file.  (Read 21224 times)

MaxCuriosus

  • Full Member
  • ***
  • Posts: 136
Re: Eliminating empty strings in TStringList when reading from text file.
« Reply #150 on: March 18, 2020, 01:44:01 pm »
I've run the benchmark program for the algorithms that I could compile.

Since in my view performance should be (execution time) x (memory used), I've added an another column where the elapsed time is doubled for those algorithms that reserve or use an additional temporary memory of size comparable to that of the file. It's based on my understanding of the various algorithms. I could be wrong.

Code: Text  [Select][+][-]
  1. Configuration: CPU 2.41GHz, Win8-64, Laz1.8.0, FPC3.0.4
  2. TestSize = 300000
  3. LineSize = 16
  4. RepCount = 10
  5. TestCount = 240009
  6.  
  7. Running TestProcsMSec...
  8.  
  9. ASerge    measured / weighted elapsed ms:    136      136
  10. Avk2      measured / weighted elapsed ms:    119      119
  11. Bruno     measured / weighted elapsed ms:    213      426
  12. Bruno2    measured / weighted elapsed ms:    110      110
  13. Bruno3    measured / weighted elapsed ms:    107      107
  14. Egsuh     measured / weighted elapsed ms:    490      490
  15. Egsuh2    measured / weighted elapsed ms:    320      320
  16. Jamie     measured / weighted elapsed ms:    127 F
  17. Max_vBK   measured / weighted elapsed ms:    134      134
  18. Thaddy    measured / weighted elapsed ms:    354      708
  19.  
  20. Running TestProcTicks...
  21.  
  22. ASerge    elapsed ticks:    324796868
  23. Avk2      elapsed ticks:    283025674
  24. Bruno     elapsed ticks:    508961339
  25. Bruno2    elapsed ticks:    261178756
  26. Bruno3    elapsed ticks:    255373507
  27. Egsuh     elapsed ticks:   1000000000
  28. Egsuh2    elapsed ticks:    763152835
  29. Jamie     elapsed ticks:    304024864 (failure)
  30. Max_vBK   elapsed ticks:    321377710
  31. Thaddy    elapsed ticks:    845322421
  32.  
  33.  

Code: Text  [Select][+][-]
  1. Configuration: CPU 2.41GHz, Debian9-64, Laz2.0.2, FPC3.0.4
  2. TestSize = 300000
  3. LineSize = 16
  4. RepCount = 10
  5. TestCount = 240009
  6.  
  7. Running TestProcsMSec...
  8.  
  9. ASerge    measured / weighted elapsed ms:    147      147
  10. Avk2      measured / weighted elapsed ms:    117      117
  11. Bruno     measured / weighted elapsed ms:    242      484
  12. Bruno2    measured / weighted elapsed ms:    106      106
  13. Bruno3    measured / weighted elapsed ms:    105      105
  14. Egsuh     measured / weighted elapsed ms:    245      245
  15. Egsuh2    measured / weighted elapsed ms:    180      180
  16. Jamie     measured / weighted elapsed ms:    135 F
  17. Max_vBK   measured / weighted elapsed ms:    142      142
  18. Thaddy    measured / weighted elapsed ms:    327      654
  19.  
  20. Running TestProcTicks...
  21.  
  22. ASerge    elapsed ticks:    352227997
  23. Avk2      elapsed ticks:    281259748
  24. Bruno     elapsed ticks:    581155215
  25. Bruno2    elapsed ticks:    255570533
  26. Bruno3    elapsed ticks:    251687955
  27. Egsuh     elapsed ticks:    573100117
  28. Egsuh2    elapsed ticks:    435390775
  29. Jamie     elapsed ticks:    325053257 (failure)
  30. Max_vBK   elapsed ticks:    341143008
  31. Thaddy    elapsed ticks:    786013245
  32.  

Debian9 seems to be significantly more favorable for algorithms Egsuh and Egsuh2. Any explanation?

 

TinyPortal © 2005-2018