• Medientyp: E-Artikel
  • Titel: Specialization through dynamic staging
  • Beteiligte: Danilewski, Piotr; Köster, Marcel; Leißa, Roland; Membarth, Richard; Slusallek, Philipp
  • Erschienen: Association for Computing Machinery (ACM), 2015
  • Erschienen in: ACM SIGPLAN Notices
  • Sprache: Englisch
  • DOI: 10.1145/2775053.2658774
  • ISSN: 0362-1340; 1558-1160
  • Schlagwörter: Computer Graphics and Computer-Aided Design ; Software
  • Entstehung:
  • Anmerkungen:
  • Beschreibung: <jats:p>Partial evaluation allows for specialization of program fragments. This can be realized by staging, where one fragment is executed earlier than its surrounding code. However, taking advantage of these capabilities is often a cumbersome endeavor. In this paper, we present a new metaprogramming concept using staging parameters that are first-class citizen entities and define the order of execution of the program. Staging parameters can be used to define MetaML-like quotations, but can also allow stages to be created and resolved dynamically. The programmer can write generic, polyvariant code which can be reused in the context of different stages. We demonstrate how our approach can be used to define and apply domain-specific optimizations. Our implementation of the proposed metaprogramming concept generates code which is on a par with templated C++ code in terms of execution time.</jats:p>