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

Antoine Latter aslatter at gmail.com
Thu Oct 18 17:29:16 CEST 2012


On Thu, Oct 18, 2012 at 9:06 AM, Janek S. <fremenzone at poczta.onet.pl> wrote:
>> 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.
>

You could email Bryan, the author of criterion.

> Janek



More information about the Haskell-Cafe mailing list