haskell
Haskell jaror 7mo ago 100%

The Haskell Unfolder Episode 22: foldr-build fusion

https://well-typed.com/blog/2024/03/haskell-unfolder-episode-22-foldr-build-fusion/

When composing several list-processing functions, GHC employs an optimisation called foldr-build fusion. Fusion combines functions in such a way that any intermediate lists can often be eliminated completely. In this episode, we will look at how this optimisation works, and at how it is implemented in GHC: not as built-in compiler magic, but rather via user-definable rewrite rules.

3
0
Comments 0