[Haskell-cafe] Known Unknowns
Chris Kuklewicz
haskell at list.mightyreason.com
Wed Jan 25 19:19:44 EST 2006
There is a new combined benchmark, "partial sums" that subsumes several earlier
benchmarks and runs 9 different numerical calculations:
http://haskell.org/hawiki/PartialSumsEntry
I took the Clean entry and, since there were so many recursive computations, I
made compute and altCompute higher order functions. No speed optimization work
has been done yet, but it seems really fast.
A new http://haskell.org/hawiki/KnucleotideEntry has been accepted, replacing
the one with the memory leak. The speed is also better, but still poor, due to
Data.Hashtable. GHC 6.6.x should eventually help.
Also on the topic of poor speed: http://haskell.org/hawiki/NbodyEntry
At the bottom of the page is Einar's really cool existing entry (open mutable
records). At the top of the page is best effort to replace it, but it runs at
almost the same speed. Which is very much slower (10x) than other entries, such
as OCaml.
It is odd that small scale numerics, such as the partial-sums functions, can be
made fast but not medium scale numerics like the n-body integration. There are
5 fixed mass parameters and 30 variables (5*3 positions + 5*3 velocities).
Addition, Subtraction, Multiplication, Division. And we can't get it going
nearly as fast as it ought to run.
Note: The garbage collector is not a factor (%GC time 0.9%).
Like the Hashtable glitch, if this were part of real program then a small bit of
c-code could be attached via FFI.
Are there little known Haskell idioms for doing math?
Do we have to write a recursive function with 30 separate parameters?
Do we have to peek and poke unboxed doubles?
Is there an undocumented -funleash-fortran parameter?
Will this be fixable in Haskell' ("Haskell-Prime")?
More information about the Haskell-Cafe
mailing list