4 ms·
> Why would one prefer to fully remove laziness? Far from an Ocaml/Haskell expert, but is it that laziness makes resource use less predictable?
by emmelaich 5y ago
> Why would one prefer to fully remove laziness?
Far from an Ocaml/Haskell expert, but is it that laziness makes resource use less predictable?
- ghostwriter 5y agoLaziness on itself does not prevent one from properly evaluating resource utilisation. In fact, laziness helps in resource preservation. But what makes it less predictable is various optimisation techniques that come to aid the lazy environment: strictness analysis, rewrite rules, and stream fusion[1][2]. They may change significantly between compiler releases and affect the previously optimised codebase. [1] https://wiki.haskell.org/GHC_optimisations https://wiki.haskell.org/GHC_optimisations [2] https://markkarpov.com/tutorial/ghc-optimization-and-fusion.html https://markkarpov.com/tutorial/ghc-optimization-and-fusion....