Optimizing Procedure Calls in Block-structured Languages

Jeremy Philip Goodwin, Edward F. Gehringer · Software Practice and Experience · 1996

Static chains and displays are two techniques used by compilers to implement variable references for block-structuredprogramming languages. Both methods impose significant run-time overhead during procedure calls and variable references. This paper investigates several optimizations to improve upon common practice. The effectiveness of the various schemes is measured by collecting dynamic reference traces from executing Ada programs and assigning costs for procedure calls and variable references using two cost models. One model assumes a complex instruction-set architecture and the other assumes a reduced instruction-set architecture. Optimizations to the static chain scheme are found to significantly reduce its overall cost and approach the cost of the display scheme while using fewer registers than a display.

Read the paper · More papers on PaperTik