Contextual dispatch for function specialization
Contextual dispatch for function specialization
复制标题
函数专业化的上下文调度
DOI:
10.1145/3428288
复制
发表时间:
2020
影响因子:
--
通讯作者:
Vitek, Jan
中科院分区:
文献类型:
--
作者:
Flückiger, Olivier;Chari, Guido;Yee, Ming-Ho;Ječmen, Jan;Hain, Jakob;Vitek, Jan
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.7× 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.
登录
查看更多内容
影响因子:
19
作者:
A. Gal;Brendan Eich;Mike Shaver;David Anderson;David Mandelin;M. Haghighat;Blake Kaplan;Graydon Hoare;B. Zbarsky;Jason Orendorff;J. Ruderman;Edwin W. Smith;Rick Reitmaier;Michael Bebenita;Mason Chang;M. Franz
通讯作者:
M. Franz
影响因子:
--
作者:
Edd Barrett;Carl Friedrich Bolz-Tereick;Rebecca Killick;S. Mount;L. Tratt
通讯作者:
Edd Barrett;Carl Friedrich Bolz-Tereick;Rebecca Killick;S. Mount;L. Tratt
DOI:
10.1145/378795.378797
发表时间:
2001-05
期刊:
--
影响因子:
--
作者:
A. Kennedy;Don Syme
通讯作者:
A. Kennedy;Don Syme
DOI:
10.1145/2254064.2254094
发表时间:
2012
期刊:
Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation
影响因子:
--
作者:
Brian Hackett;Shu
通讯作者:
Shu
DOI:
--
发表时间:
2012
期刊:
International Conference on Parallel Architectures and Compilation Techniques
影响因子:
--
作者:
Justin Talbot;Zach DeVito;P. Hanrahan
通讯作者:
P. Hanrahan