Bryan O’Sullivan’s website. Recent blog posts below.
Criterion, a new benchmarking library for Haskell
I’m pleased to announce the availability of criterion, a new library for measuring the performance of Haskell code. Compared to most other benchmarking frameworks (for any programming language, not just Haskell), criterion focuses on being easy to use, informative, and robust. Here’s a canonical benchmark-worthy function, which has the desirable properties of being both small and slow: -- Save this as a file named "Fibber.hs".import Criterion.Main (defaultMain)fib :: Int -> Intfib 0 = 0fib 1 = 1fib n = fib (n-1) + fib (n-2) To compile a program that will benchmark our fib function, we write a trivial main entry point: ...