Skip to main content

Using higher-order control flow analysis when compiling functional languages

  • Conference paper
  • First Online:
  • 268 Accesses

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 844))

Abstract

Runtime type tests elimination and closures optimizations speed up executable programs produced by the compiler. The more higher-order programs are, the more impressive the gains will be obtained. For instance, we measured a 20 % speed-up for programs implementing denotational semantics or, more generally, for programs intensively using curried functions. On the other hand, the Ocfa analysis has a very high complexity: in the worst case, it is O(n 3). One could expect that the addition of this analysis may slow down the compiler in a drastic way. This is not true: the Ocfa analysis is almost linear for usual programs. As an experimental proof, a complete bootstrap of the Bigloo compiler (40.000 lines of Scheme code) is only 25 % slower when the Ocfa analysis is enabled.

This is a preview of subscription content, log in via an institution.

References

  1. M. Serrano. De l'utilisation des analyses de flot de contrôle dans la compilation des langages fonctionnels. In Pierre Lescanne, editor, Actes des journées du GDR de Programmation, 1993.

    Google Scholar 

  2. O. Shivers. Control-Flow Analysis of Higher-Order Languages or Taming Lambda. CMU-CS-91-145, School of Computer Science, Carnegie Mellon University, Pittsburgh, PA 15213, May 1991.

    Google Scholar 

  3. M. Serrano and P. Weis. 1+1=1: an optimizing caml compiler. In ACM SIGPLAN Workshop on ML and its Applications, 1994.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Manuel Hermenegildo Jaan Penjam

Rights and permissions

Reprints and permissions

Copyright information

© 1994 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Serrano, M. (1994). Using higher-order control flow analysis when compiling functional languages. In: Hermenegildo, M., Penjam, J. (eds) Programming Language Implementation and Logic Programming. PLILP 1994. Lecture Notes in Computer Science, vol 844. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58402-1_31

Download citation

  • DOI: https://doi.org/10.1007/3-540-58402-1_31

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-58402-5

  • Online ISBN: 978-3-540-48695-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics