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
[email protected] • http://www.joachim-breitner.de/
Jabber: [email protected] • GPG-Key: 0xF0FBF51F
Debian Developer: [email protected]
signature.asc
Description: This is a digitally signed message part
_______________________________________________ ghc-devs mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-devs
