[Haskell-cafe] How to write fast for loops

Yitzchak Gale gale at sefer.org
Mon May 26 16:03:08 UTC 2014


John Lato wrote:
> For Int, toEnum/fromEnum is a noop, but on Word32 it's not.

Actually, GHC has type-specialized rewrite rules for
toEnum/fromEnum on types from Data.Word.
So it's a noop on a 32-bit platform and nearly a noop
on 64-bit.

Regards,
Yitz


More information about the Haskell-Cafe mailing list