[Haskell-cafe] Efficient functional idiom for histogram

Dmitry Olshansky olshanskydr at gmail.com
Wed Aug 5 09:14:33 EDT 2009


My measurements show that
- using strict version of insertWith doesn't improve performance. - in case
of compilation with -O2 flag foldl' also is equal to foldl (-O2 gives approx
2 time impovements).- using RandomGen and State monad to generate a list
gives at least 4 times improvements (on 1 000 000 items).

More complicated improvements (using Array, PRNG and so on) were not tested
by me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090805/139ff27e/attachment.html


More information about the Haskell-Cafe mailing list