[Haskell-cafe] A tale of three shootout entries

Adrian Hey ahey at iee.org
Tue Nov 27 11:13:36 EST 2007


Simon Peyton-Jones wrote:
> | Something I found with Dons version on my machine was that if I removed
> | all the exclamation marks and the -fbang-patterns bit at the top it went
> | about 20% faster as well as being much cleaner code, but with my very
> | rudimentary understanding of Haskell I wasn't entirely sure it would
> | produce the same results if I did this and didn't get round to checking.
> 
> If, after investigation (and perhaps checking with Don) you find that adding bangs makes your program go slower, even though the function is in fact strict (otherwise it might go slower because it's just doing more work!) then I'd love to see a test case.

I wonder if this could be related to what I observed with AVL trees and
mentioned a while back (using a strict data type is slower than using
explicit seqs to get the same strictness).

Regards
--
Adrian Hey






More information about the Haskell-Cafe mailing list