Sciweavers

IFL
1997
Springer

Common Subexpressions Are Uncommon in Lazy Functional Languages

14 years 3 months ago
Common Subexpressions Are Uncommon in Lazy Functional Languages
Common subexpression elimination is a well-known compiler optimisation that saves time by avoiding the repetition of the same computation. In lazy functional languages, referential transparency renders the identification of common subexpressions very simple. More common subexpressions can be recognised because they can be of arbitrary type whereas standard common subexpression elimination only shares primitive values. However, because lazy functional languages decouple program structure from data space allocation and control flow, analysing its effects and deciding under which conditions the elimination of a common subexpression is beneficial proves to be quite difficult. We developed and implemented the transformation for the language Haskell by extending the Glasgow Haskell compiler. On real-world programs the transformation showed nearly no effect. The reason is that common subexpressions whose elimination could speed up programs are uncommon in lazy functional languages. 1 Tran...
Olaf Chitil
Added 08 Aug 2010
Updated 08 Aug 2010
Type Conference
Year 1997
Where IFL
Authors Olaf Chitil
Comments (0)