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

Thomas Schilling nominolo at googlemail.com
Thu Oct 18 22:28:20 CEST 2012


Yes, Criterion always discards the time of the first evaluation.

On 18 October 2012 15:06, 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.
>
> Janek
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



-- 
Push the envelope. Watch it bend.



More information about the Haskell-Cafe mailing list