[Haskell-cafe] Benchmarks game updated to ghc 6.12.2

Ketil Malde ketil at malde.org
Thu Apr 29 04:54:09 EDT 2010


Ketil Malde <ketil at malde.org> writes:

> Is it an idea to go back a few steps to more idiomatic code?

I had a whirl at the 'reverse complement' benchmark, where we're in the
Java ballpark for performance and memory, but at twice the code size.

My simple implmentation is down from seventy to about forty lines,
perhaps thirty-five if I remove comments etc.  The bad news is that it's
about twice as slow, my benchmark takes about 0.45s vs 0.25 for the
shootout entry.

One interesting observation is that 'map' from Data.ByteString working
directly on Word8 is actually *slower* than 'map' from
Data.ByteString.Char8.

Anyway - it occurs to me that this can fairly simply be sped up by
parallelizing: chunk the input, complement chunks in parallel, and
reverse.  Any takers?

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Haskell-Cafe mailing list