The list fusion lab

Joachim Breitner mail at joachim-breitner.de
Thu Sep 11 07:34:56 UTC 2014


Hi, especially David and Dan,

I wanted to announce this only when I had time to polish more corners,
but since you are busy hacking on list fusion, experimenting with foldrW
etc., maybe it’s better to release early (and you might enjoy polishing
the corners yourself).

Together with John Wiegly at ICFP, I started to create a list
performance laboratory. You can find it at:
        https://github.com/nomeata/list-fusion-lab
        
The idea is simple: Have a number of modules (in ListImpls/) that
provide the same list functions (see ListImpls/exports). Then there is a
test suite (Benchmarks.hs) and a driver (driver.hs). The latter takes,
as arguments, a number of ghc binaries and a number of modules from
ListImpls, compiles a small helper (ListTestsTemplate.hs) with all
combinations (using CPP to select the right module), runs the benchmarks
and aggregates the results.

Note that the tests are not run in the same process as the runner, which
reduces the number of libraries that the tested compiler needs to have
installed.

It is half finished in a few ways:
      * The reporting is unfinished. We used criterion’s default, but it
        is not quite what we want to see.
      * It still requires the tested compiler to have criterion
        installed, which is tricky for GHC-HEAD. I’d like to have two
        modules providing a function "(Int -> ()) -> IO Double", one
        with criterion and one with some ad-hoc measurement, and a way
        for the driver to choose. This way you can get rough
        measurements without criterion.
      * I’d like to also measure allocations. Again, that’d be nicer
        with a way of running the benchmarks without criterion.
      * There are clearly not enough benchmarks.

The plan for this is that when evaluating a different implementation of
a list function, or possibly a completely different fusion
implementation (foldrW, stream fusion), we can simply add it here and
have something reliable to base our decisions on, instead of waiting for
one of the experienced wizards to come along and cast a verdict.

Enjoy, and send pull requests!

Greetings,
Joachim



-- 
Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttp://www.joachim-breitner.de/
  Jabber: nomeata at joachim-breitner.de  • GPG-Key: 0xF0FBF51F
  Debian Developer: nomeata at debian.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140911/0bf0dcba/attachment.sig>


More information about the ghc-devs mailing list