|
The site is out of date and should be updated!
Modern compilers optimize code during the compilation process. The goal
of the optimizations is to obtain a program that is semantically equivalent,
executes faster and uses less memory.
The Glasgow Haskell Compiler also uses a simplifier. This simplifier is not
modular and difficult to extend. The HsOpt simplifier is a 'simplified' GHC
simplifier. The HsOpt simplifier is modular and relative easy to extend. HsOpt
is based on the paradigm of correctness preserving rewrite rules. The transformations can be applied separately.
HsOpt interacts with the Helium compiler, a compiler for a large subset of
Haskell. Helium uses a naive pattern matcher compiler which results in
straight forward intermediate Core code. HsOpt simplify most of the straight
forward code. The result is Core code that could have been produced by an
intelligent pattern match compiler.
The simplified program executes 10-15% faster and uses 0-15% less memory.
|