On Automating Hybrid Execution of Ahead-of-Time and Just-in-Time Compiled Code
The divergence between Ahead-of-Time (AOT) and Just-in-Time (JIT) compilation techniques presents a unique predicament when trying to achieve optimal performance in software applications. AOT compilation offers efficiency by pre-compiling and optimizing code, while JIT compilation enhances peak performance through dynamic optimization and speculation. However, the improved peak performance achieved by JIT compilation is offset by the poor warm-up performance due to the overhead caused by analyses and optimizations at run time. Previously, we proposed blending these two compilation techniques, aiming to maintain high peak performance while enhancing warm-up performance. Since the programmer had to manually select functions for AOT compilation, it required familiarity with the code base and with compilers in general. This paper presents a strategy for blending these two compilation techniques automatically. We provide an overview of language implementation features which have to be considered when implementing such an automated approach. We also propose a call-graph based analysis when determining whether certain code should be replaced by its AOT-compiled equivalent. We implemented our approach within GraalVM, a multi-language virtual machine based on the Java HotSpot VM. The results from different benchmarks show our approach leads to a speedup of 1.48× on average for data setup and up to 2.6× for warm-up and 3.5× for peak performance. Moreover, our automated approach is able to find optimizations which have easily been missed by manual annotations.
Authors
- Hanspeter Mössenböck (ORCID: https://orcid.org/0000-0001-7706-7308)
- Roland Schatz (ORCID: https://orcid.org/0009-0006-3100-8816)
- Paley Li (ORCID: https://orcid.org/0009-0001-7461-3331)
- Christoph Pichler (ORCID: https://orcid.org/0009-0008-7223-6692)
Institutions
- Johannes Kepler University of Linz (AT)
Publication Details
- Published
- 2024-10-17
- DOI
- https://doi.org/10.1145/3689490.3690398
- Citations
- 1
- Primary Topic
- Formal Methods in Verification
- Type
- article
- Field-Weighted Citation Impact
- 0.36