We define runtime code generation (RTCG) as dynamically adding code to the instruction stream of an executing program. It has been in use since the 1940s, but fell from favor because changing hardware and software technologies made it less profitabile and its ad-hoc implementation made it nonportable. In this paper we argue for it's return. We base our arguments on ongoing changes in hardware technology, software technology, and workloads. Each of these changes brings about circumstances in which dynamically optimized code can execute fast enough to pay for the runtime overhead of creating it. We support our analysis with concrete examples. We compare static-code and RTCG implementations of several applications and show that RTCG leads to performance improvements.
%A David Keppel
%A Susan J. Eggers
%A Robert R. Henry
%T A Case for Runtime Code Generation
%R UWCSE 91-11-04
%I University of Washington Department of Computer Science and Engineering
%D November 1991
@techreport{KEH:91,
author={David Keppel and Susan J. Eggers and Robert R. Henry},
title={A Case for Runtime Code Generation},
number={UWCSE 91-11-04},
institution={University of Washington
Department of Computer Science and Engineering},
month={November},
year={1991}
}