Sciweavers

CEFP
2007
Springer

From Interpretation to Compilation

14 years 5 months ago
From Interpretation to Compilation
Abstract. In this paper we sketch some experiments with the construction of a simple compiler for a high level intermediate lazy functional language, with C++ as a target language. Because the compiler is intended for educational and experimental use, simplicity and clearness of construction are considered to be more important than efficiency. Starting point for the construction is a simple interpreter. In a first step this interpreter is turned into a simple compiler in a straightforward manner. The performance of a number of compiled benchmarks is analysed in a comparison with the interpreter and the Clean and GHC compilers. This analysis leads to some suggestions for optimisations. Of these optimisations tail recursion optimisation and optimisation of numerical functions and numerical (sub)expressions in functions are implemented. It turns out that in many cases these optimisations suffice to obtain a competitive performance.
Jan Martin Jansen, Pieter W. M. Koopman, Rinus Pla
Added 07 Jun 2010
Updated 07 Jun 2010
Type Conference
Year 2007
Where CEFP
Authors Jan Martin Jansen, Pieter W. M. Koopman, Rinus Plasmeijer
Comments (0)