A type-based compiler for standard ML

  • Authors:
  • Zhong Shao;Andrew W. Appel

  • Affiliations:
  • Department of Computer Science, Yale University, 51 Prospect Street, New Haven, CT;Department of Computer Science, Princeton University, 35 Olden Street, Princeton, NJ

  • Venue:
  • PLDI '95 Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation
  • Year:
  • 1995

Quantified Score

Hi-index 0.00

Visualization

Abstract

Compile-time type information should be valuable in efficient compilation of statically typed functional languages such as Standard ML. But how should type-directed compilation work in real compilers, and how much performance gain will type-based optimizations yield? In order to support more efficient data representations and gain more experience about type-directed compilation, we have implemented a new type-based middle end and back end for the Standard ML of New Jersey compiler. We describe the basic design of the new compiler, identify a number of practical issues, and then compare the performance of our new compiler with the old non-type-based compiler. Our measurement shows that a combination of several simple type-based optimizations reduces heap allocation by 36%; and improves the already-efficient code generated by the old non-type-based compiler by about 19% on a DECstation 500.