[Haskell-cafe] How to correctly benchmark code with Criterion?

Janek S. fremenzone at poczta.onet.pl
Thu Oct 18 16:06:48 CEST 2012

> So the evaluation will be included in the benchmark, but if "bench" is
> doing enough trials it will be statistical noise.
When I intentionally delayed my dataBuild function (using delayThread 1000000) the estimated time 
of benchmark was incorrect, but when I got the final results all runs were below 50ms, which 
means that initial run that took 1 second was discarded. So it seems to me that the first 
evaluation is discarded. Would be good if someone could definitely confirm that.


More information about the Haskell-Cafe mailing list