Optimizing ML with run-time code generation
Authors:
Open Access
- 1 May 1996
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 31 (5) , 137-148
Abstract
We describe the design and implementation of a compiler that automatically translates ordinary programs written in a subset of ML into code that generates native code at run time. Run-time code generation can make use of values and invariants that cannot be exploited at compile time, yielding code that is often superior to statically optimal code. But the cost of optimizing and generating code at run time can be prohibitive. We demonstrate how compile-time specialization can reduce the cost of run-time code generation by an order of magnitude without greatly affecting code quality. Several benchmark programs are examined, which exhibit an average cost of only six cycles per instruction generated at run time.Keywords
This publication has 22 references indexed in Scilit:
- Fast, effective dynamic compilation1996
- Type feedback vs. concrete type inference1995
- Optimistic incremental specialization1995
- Extensibility safety and performance in the SPIN operating system1995
- DCG1994
- Optimizing dynamically-dispatched calls with run-time type feedback1994
- Separate compilation for Standard ML1994
- Using Multilisp for solving constraint satisfaction problems: An application to nucleic acid 3D structure determinationHigher-Order and Symbolic Computation, 1994
- Automatic autoprojection of recursive equations with global variables and abstract data typesScience of Computer Programming, 1991
- Hardware/software trade‐offs for bitmap graphics on the blitSoftware: Practice and Experience, 1985