in reply to Re: Benchmarking "Are all these characters in this sentence?"
in thread Benchmarking "Are all these characters in this sentence?"

Good point. My assumption when I wrote the code was that the testFn routines were going to be fairly expensive, so benchmark_routine wasn't unacceptable overhead.

I should have written separate test and benchmark routines, rather than let the benchmark run and check my test cases.

Re-running the tests with the 1..20 fix you suggested does alter the percentages between tests, but doesn't change the relative rankings much.

Short

tallulah_OriginalPost             107/s
Tanktalus_AllRegex_Study          124/s
Tanktalus_AllRegex                130/s
varian_hash                       152/s
RMGir_slice                       207/s
moritz_BuildRegex_WithStudy       243/s
moritz_BuildRegex                 261/s
Tanktalus_AllIndex                452/s
RMGir_index                       678/s


LongShort                   

varian_hash                      4.76/s
RMGir_slice                      5.77/s
tallulah_OriginalPost             166/s
Tanktalus_AllRegex_Study          169/s
Tanktalus_AllRegex                207/s
moritz_BuildRegex_WithStudy       241/s
moritz_BuildRegex                 395/s
Tanktalus_AllIndex                731/s
RMGir_index                      1000/s


ShortLong

tallulah_OriginalPost            3.15/s
Tanktalus_AllRegex_Study         4.27/s
Tanktalus_AllRegex               4.31/s
moritz_BuildRegex_WithStudy      5.22/s
moritz_BuildRegex                5.26/s
varian_hash                      7.84/s
RMGir_index                      13.9/s
RMGir_slice                      15.3/s
Tanktalus_AllIndex               15.8/s


LongLong

tallulah_OriginalPost            3.17/s
Tanktalus_AllRegex_Study         4.24/s
varian_hash                      4.35/s
Tanktalus_AllRegex               4.35/s
moritz_BuildRegex                5.17/s
moritz_BuildRegex_WithStudy      5.22/s
RMGir_slice                      6.60/s
RMGir_index                      12.5/s
Tanktalus_AllIndex               15.5/s


Mike
  • Comment on Re^2: Benchmarking "Are all these characters in this sentence?"