September 2016
Intermediate to advanced
408 pages
9h 18m
English
Profiling aside, benchmarking the time a calculation takes to perform is a direct indicator of real-world performance. Benchmarking Haskell applications is pretty much dominated by the criterion library. There is a system called nofib, which is used to benchmark GHC itself, but for applications criterion is superior. Criterion even produces interactive web pages describing the results of benchmarks, which is a nice feature.
This text is written for criterion-1.1.1.0. Obviously, the criterion package needs to be installed:
cabal install criterion # or: stack install criterion
A criterion benchmark suite is created as a normal Haskell program. An example is this:
–– file: benchmark.hs import Criterion.Main ...
Read now
Unlock full access