1996 · 54 citations · 23 references
ComputingComputer EngineeringComputer ScienceCompilersComputer ArchitectureProgramming LanguagesCode GenerationCompiler ConstructionControl-flow AnalysisData-flow AnalysisIntermediate RepresentationPerformance OptimizationDynamic Code AnalysisDynamic Code GenerationDynamic CompilationImplementation ComplexityObject Code Optimization
Given a repeated computation, part of whose input context remains invariant across all repetitions, program staging improves performance by separating the computation into two phases. An early phase executes only once, performing computations depending only on invariant inputs, while a late phase repeatedly performs the remainder of the work given the varying inputs and the results of the early computations.Common staging techniques based on dynamic compilation statically construct an early phase that dynamically generates object code customized for a particular input context. In effect, the results of the invariant computations are encoded as the compiled code for the late phase.This paper describes an alternative approach in which the results of early computations are encoded as a data structure, allowing both the early and late phases to be generated statically. By avoiding dynamic code manipulation, we give up some optimization opportunities in exchange for significantly lower dynamic space/time overhead and reduced implementation complexity.
23
Efficient implementation of the smalltalk-80 system
L. Peter Deutsch, Allan M. Schiffman · 1984 · 589 citations
Incremental computation via function caching
William Pugh, Tim Teitelbaum · 1989 · 197 citations
Fast, effective dynamic compilation
Joel Auslander, Matthai Philipose, Craig Chambers et al. · 1996 · 189 citations · Full text