[Haskell-cafe] monads, memoization etc
will.yager at gmail.com
Sat Aug 8 17:45:25 UTC 2015
> On Aug 8, 2015, at 03:30, Ilya Razenshteyn <ilyaraz at gmail.com> wrote:
> Interestingly, the code became almost twice as slow as a result..
If I had to guess, I would say that GHC transformed your original function (which took a reference to an ST hashtable) into a faster worker function that passed the hashtable's constituent data around unboxed, among other things. But I don't think GHC will perform similar optimizations now that the hashtable is passed around via ReaderT.
More information about the Haskell-Cafe