Run time code generation is an alternative and complement to compile time program analysis and optimization Static analyses are inherently imprecise because most interesting aspects of run time behavior are uncomputable By defer ring aspects of compilation to run time more precise infor mation about program behavior can be exploited leading to greater opportunities for code improvement The cost of performing optimization at run time is of paramount importance since it must be repaid by improved performance in order to obtain an overall speedup This pa per describes a lightweight approach to run time code gen eration called deferred compilation in which compile time specialization is employed to reduce the cost of optimizing and generating code at run time Implementation strategies developed for a prototype compiler are discussed and the results of preliminary experiments demonstrating signi cant overall speedup are presented