Contextual Dispatch for Function Specialization
The result's identifiers
Result code in IS VaVaI
<a href="https://www.isvavai.cz/riv?ss=detail&h=RIV%2F68407700%3A21240%2F20%3A00347253" target="_blank" >RIV/68407700:21240/20:00347253 - isvavai.cz</a>
Result on the web
<a href="https://doi.org/10.1145/3428288" target="_blank" >https://doi.org/10.1145/3428288</a>
DOI - Digital Object Identifier
<a href="http://dx.doi.org/10.1145/3428288" target="_blank" >10.1145/3428288</a>
Alternative languages
Result language
angličtina
Original language name
Contextual Dispatch for Function Specialization
Original language description
In order to generate efficient code, dynamic language compilers often need information, such as dynamic types, not readily available in the program source. Leveraging a mixture of static and dynamic information, these compilers speculate on the missing information. Within one compilation unit, they specialize the generated code to the previously observed behaviors, betting that past is prologue. When speculation fails, the execution must jump back to unoptimized code. In this paper, we propose an approach to further the specialization, by disentangling classes of behaviors into separate optimization units. With contextual dispatch, functions are versioned and each version is compiled under different assumptions. When a function is invoked, the implementation dispatches to a version optimized under assumptions matching the dynamic context of the call. As a proof-of-concept, we describe a compiler for the R language which uses this approach. Our implementation is, on average, 1.7x faster than the GNU R reference implementation. We evaluate contextual dispatch on a set of benchmarks and measure additional speedup, on top of traditional speculation with deoptimization techniques. In this setting contextual dispatch improves the performance of 18 out of 46 programs in our benchmark suite.
Czech name
—
Czech description
—
Classification
Type
J<sub>ost</sub> - Miscellaneous article in a specialist periodical
CEP classification
—
OECD FORD branch
10201 - Computer sciences, information science, bioinformathics (hardware development to be 2.2, social aspect to be 5.8)
Result continuities
Project
<a href="/en/project/EF15_003%2F0000421" target="_blank" >EF15_003/0000421: Big Code: Scalable Analysis of Massive Code Bases</a><br>
Continuities
P - Projekt vyzkumu a vyvoje financovany z verejnych zdroju (s odkazem do CEP)
Others
Publication year
2020
Confidentiality
S - Úplné a pravdivé údaje o projektu nepodléhají ochraně podle zvláštních právních předpisů
Data specific for result type
Name of the periodical
Proceedings of the ACM on Programming Languages (PACMPL)
ISSN
2475-1421
e-ISSN
—
Volume of the periodical
4
Issue of the periodical within the volume
OOPSLA
Country of publishing house
US - UNITED STATES
Number of pages
24
Pages from-to
1-24
UT code for WoS article
—
EID of the result in the Scopus database
2-s2.0-85097582242