Criterion 0.2, an improved Haskell benchmarking library

I’m pleased to announce the availability of version 0.2 of my criterion library for Haskell performance evaluation.

Compared to version 0.1, this version has some significant changes.

  • The benchmarking API has been improved! If you’re benchmarking a pure function, you no longer need to feed it an Int to ensure that it won’t get thunked or let-floated. Instead, Use the B data type (see the examples/ directory) to specify an unsaturated function that you want to benchmark, along with its last argument. Many thanks to Daniel Peebles for suggesting this approach, which makes the use of criterion considerably more pleasant.
  • Neil Brown added a --kde-same-axis command-line option to allow plotting the KDEs for all the benchmarks with the same X axis. I’d like to thank Neil for his helpful work on some other code cleanup issues, too.
  • There are some more, and better quality, examples in the examples/ directory.
  • Tim Docker contributed a patch that improves graph rendering.

As the changes above suggest, several people have been actively contributing to the improvement of criterion, and I’m delighted by this. Please feel welcome to get involved; there are many improvements I’d like to make, but of course I have limited time to work on them. I’ll be happy to talk with you about other potentially useful changes.

Posted in haskell, open source
2 comments on “Criterion 0.2, an improved Haskell benchmarking library
  1. RayNbow says:

    Nice work. :)

    Btw, the haddock documentation in Criterion.Main still uses a dummy Int argument in the examples.

  2. Sean says:

    I just ran into the problem that RayNbow mentioned. Can you update the Haddock docs to reflect the proper use? For me, that’s the obvious source for documentation rather than the examples directory. I had to come back to this post to figure out what I did wrong.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>