[Haskell-cafe] How to improve speed? (MersenneTwister is several
times slower than C version)
lemmih at gmail.com
Wed Nov 1 20:54:52 EST 2006
On 11/2/06, Lennart Augustsson <lennart at augustsson.net> wrote:
> A big problem with the Mersenne Twister is the shifts. As has been
> noted elsewhere, ghc doesn't do such a great job on those.
Actually, the shifts are only evaluated once (hurrah for lazy
evaluation) and with -funfolding-use-threshold=16 they're all compiled
to unchecked primitives (GHC.Prim.uncheckedShiftRL#).
More information about the Haskell-Cafe