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

被引:0
|
作者
Marr, Stefan [1 ]
Seaton, Chris [2 ]
Ducasse, Stephane [1 ]
机构
[1] Inria, RMoD, Lille, France
[2] Univ Manchester, Oracle Labs, Manchester M13 9PL, Lancs, England
关键词
Metaprogramming; Reflection; Proxies; Metaobject Protocols; Meta-tracing; Partial Evaluation; Virtual Machines; Just-in-Time Compilation; LANGUAGES;
D O I
10.1145/2813885.2737963
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:545 / 554
页数:10
相关论文
共 1 条
  • [1] Feasibility analysis of zero-overhead near video-on-demand protocols in satellite channels
    Cerezo-Costas, H.
    Asorey-Cacheda, R.
    Tejada-Fuentes, J.
    Gil-Castineira, F. J.
    IET COMMUNICATIONS, 2010, 4 (13) : 1556 - 1562