Speculative Inlining of Predefined Procedures in an R5RS Scheme to C Compiler

  • Authors:
  • Marc Feeley

  • Affiliations:
  • Dépt. d'informatique et de r.o., Université de Montréal, Canada

  • Venue:
  • Implementation and Application of Functional Languages
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

The semantics of some dynamic programming languages, including Python, JavaScript, and R5RS Scheme, make it hard for a compiler to inline predefined procedures without compromising the semantics of the language. In the case of Scheme, many existing compilers can only achieve good execution speed by assuming that variables bound to predefined procedures are never mutated. This paper presents a speculative inliningapproach which is portable and achieves good performance while fully conforming to the semantics of Scheme. It has been implemented in a mature Scheme to C compiler and we report on its performance on a large benchmark suite, both in execution speed and code size.