Deforestation (computer science)

Source: Wikipedia, the free encyclopedia.

In the theory of

programming languages in computer science, deforestation (also known as fusion) is a program transformation to eliminate intermediate lists or tree structures
that are created and then immediately consumed by a program.

The term "deforestation" was originally coined by Philip Wadler in his 1990 paper "Deforestation: transforming programs to eliminate trees".[1]

Deforestation is typically applied to programs in

Haskell. One particular algorithm for deforestation, shortcut deforestation,[2] is implemented in the Glasgow Haskell Compiler.[3] Deforestation is closely related to escape analysis
.

See also

References

  1. .
  2. .
  3. ^ Peyton Jones, Simon; Andrew Tolmach; C.A.R. Hoare (2001). "Playing by the rules: rewriting as a practical optimization technique in GHC" (PDF). Proc. ACM/SIGPLAN Haskell Workshop.