Title
Zero-overhead metaprogramming: reflection and metaobject protocols fast and without compromises
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.
Year
DOI
Venue
2015
10.1145/2813885.2737963
PLDI
Keywords
Field
DocType
Just-in-Time Compilation,Meta-tracing,Metaobject Protocols,Metaprogramming,Partial Evaluation,Proxies,Reflection,Virtual Machines
Middleware,Metaprogramming,Virtual machine,Programming language,Partial evaluation,Computer science,Real-time computing,Interpreter,Just-in-time compilation,Metaobject,restrict
Conference
Volume
Issue
ISSN
50
6
0362-1340
Citations 
PageRank 
References 
10
0.60
27
Authors
3
Name
Order
Citations
PageRank
Stefan Marr112421.54
Chris Seaton2945.68
Stéphane Ducasse33418243.15