[Haskell-cafe] Monad transformer performance - Request to review benchmarking code + results
saurabhnanda at gmail.com
Mon Jan 30 04:57:43 UTC 2017
> Why do you keep expecting the compiler to "be smart"? It's just shuffling
> data around, any type of magic efficiency with Monadic computations
> requires specific knowledge about monads, which is not something we encode
> into the compiler. just saying "this should be obvious" is not very
* If inlining certain functions can give a boost to the performance, then
is it unreasonable to expect the compiler to have better heuristics about
when commonly occurring code patterns should be inlined? In this case
monads and mtl being the commonly occurring code patterns.
* At a broader level, the promise of writing pure functions was to be able
to talk about 'intent', not 'implementation' -- the classic `map` vs `for
loop` example. Additionally, pure functions give the compiler enough
opportunity to optimise code. Both these higher level promises are being
broken by this experience. Hence, I'm feeling "cheated"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe