[Haskell-cafe] Benchmarking and Garbage Collection

Jesper Louis Andersen jesper.louis.andersen at gmail.com
Thu Mar 4 14:26:08 EST 2010

On Thu, Mar 4, 2010 at 7:16 PM, Neil Brown <nccb2 at kent.ac.uk> wrote:

> However, one thing I've found is that the libraries have noticeably
> different behaviour in terms of the amount of garbage created.

In fact, CML relies on the garbage collector for some implementation
constructions. John H. Reppys "Concurrent Programming in ML" is worth
a read if you haven't. My guess is that the Haskell implementation of
CML is bloody expensive. It is based on the paper
http://www.cs.umd.edu/~avik/projects/cmllch/ where Chaudhuri first
constructs an abstract machine for CML and then binds this to the
Haskell MVar and forkIO constructions.

In any case, implementing sorting networks, Power Series
multiplication (Doug Mcilroy, Rob Pike - Squinting at power series) or
the good old prime sieve are also interesting benchmarks.


More information about the Haskell-Cafe mailing list