Results 1 -
2 of
2
FCG: a Code Generator for Lazy Functional Languages
- Compiler construction (CC 92), LNCS 641
, 1992
"... The FCG code generator produces portable code that supports efficient two-space copying garbage collection. The code generator transforms the output of the FAST compiler front end into an abstract machine code. This code explicitly uses a call stack, which is accessible to the garbage collector. In ..."
Abstract
-
Cited by 13 (3 self)
- Add to MetaCart
The FCG code generator produces portable code that supports efficient two-space copying garbage collection. The code generator transforms the output of the FAST compiler front end into an abstract machine code. This code explicitly uses a call stack, which is accessible to the garbage collector. In contrast to other functional language compilers that generate assembly directly, FCG uses the C compiler for code generation, providing high-quality code optimisations and portability. To make full use of the C compiler's capabilities, FCG includes an optimisation scheme that transforms the naively generated stack-based code into a register-based equivalent form. The results for a benchmark of functional programs show that code generated by FCG performs well in comparison with the LML compiler. 1 Introduction Functional languages offer the programmer referential transparency, and increased expressiveness in comparison with ordinary imperative languages: higher order functions, lazy evaluati...
Cache Behaviour of Lazy Functional Programs
, 1992
"... . To deepen our quantitative understanding of the performance of lazy evaluation, we have studied the cache behaviour of a benchmark of functional programs. The compiler, based on the G-machine style of graph reduction, has been modified to insert monitoring code into the executable that records ins ..."
Abstract
- Add to MetaCart
. To deepen our quantitative understanding of the performance of lazy evaluation, we have studied the cache behaviour of a benchmark of functional programs. The compiler, based on the G-machine style of graph reduction, has been modified to insert monitoring code into the executable that records instruction and data references at run time. The resulting address trace is used to drive a cache simulator that computes statistics like miss rates and traffic ratios. A number of experiments with different cache parameters (size, associativity, etc.) shows that the benchmark programs have a strong spatial locality in their memory references. This is caused by the heap allocation strategy that allocates nodes by advancing a pointer through the heap, generating new addresses. Therefore the initialisation of new heap nodes results in cache misses, which dominate performance. Comparisons with results of other functional language implementations confirm this behaviour 1 Introduction Recently, com...

