3 ms·
> I ran benchmarks [...] matching the regex Ben.*H over 100 concatenated repeats of the King James Bible. Is there a concern with these kinds of micro-benchmar
by returningfory2 4y ago
> I ran benchmarks [...] matching the regex Ben.*H over 100 concatenated repeats of the King James Bible.
Is there a concern with these kinds of micro-benchmarks, where you repeatedly do the same small operation (matching the same regex), that your results will be skewed by the branch predictor, CPU caches, etc.?
- tymscar 4y agoThat might be a concern but if you run the same benchmark , the same amount of times, on the same hardware, with the algorithms being the only difference, then you still get a proper comparison between them, even if the timings are useless outside said benchmark