Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and without Compromises

Stefan Marr 1 Chris Seaton 2, 3 Stéphane Ducasse 1
1 RMOD - Analyses and Languages Constructs for Object-Oriented Application Evolution
Inria Lille - Nord Europe, CRIStAL - Centre de Recherche en Informatique, Signal et Automatique de Lille (CRIStAL) - UMR 9189
Abstract : Runtime metaprogramming enables many useful applications and is often a convenient solution to solve problems in a generic way, which makes it widely used in frameworks, middleware, and domain-specific languages. However, powerful metaobject protocols are rarely supported and even common concepts such as reflective method invocation or dynamic proxies are not optimized. Solutions proposed in literature either restrict the metaprogramming capabilities or require application or library developers to apply performance improving techniques. For overhead-free runtime metaprogramming, we demonstrate that dispatch chains, a generalized form of polymorphic inline caches common to self-optimizing interpreters, are a simple optimization at the language-implementation level. Our evaluation with self-optimizing interpreters shows that unrestricted metaobject protocols can be realized for the first time without runtime overhead, and that this optimization is applicable for just-in-time compilation of interpreters based on meta-tracing as well as partial evaluation. In this context, we also demonstrate that optimizing common reflective operations can lead to significant performance improvements for existing applications.
Type de document :
Communication dans un congrès
Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, Jun 2015, Portland, OR, USA, France. 〈10.1145/2737924.2737963〉
Liste complète des métadonnées

Littérature citée [35 références]  Voir  Masquer  Télécharger

https://hal.inria.fr/hal-01141135
Contributeur : Lse Lse <>
Soumis le : vendredi 25 septembre 2015 - 13:30:18
Dernière modification le : mardi 3 juillet 2018 - 11:49:03
Document(s) archivé(s) le : lundi 28 décembre 2015 - 22:31:49

Fichier

pldi15-marr-et-al-zero-overhea...
Fichiers produits par l'(les) auteur(s)

Licence


Copyright (Tous droits réservés)

Identifiants

Collections

Citation

Stefan Marr, Chris Seaton, Stéphane Ducasse. Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and without Compromises. Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, Jun 2015, Portland, OR, USA, France. 〈10.1145/2737924.2737963〉. 〈hal-01141135〉

Partager

Métriques

Consultations de la notice

305

Téléchargements de fichiers

276