Answers are grounded in this paper and cite their sources.
Adopting Ahead-of-Time (AOT) compilation to improve a programming language's performance shows significant gains in execution time during consecutive program executions. However, such gains come at the cost of spending computing resources on compiling methods. This is especially noticeable when implementing “dynamic-AOT” compilation, where loadable code is generated only for some of the methods and the rest of the program can be interpreted or compiled Just-in-Time. We propose a language-independent algorithm for scheduling partial compilations, an alternative to generating machine code for all the methods in the program at once. By distributing the compilation efforts among several program executions, the algorithm enables reducing the peak program execution duration for compilation runs. The compilation decisions are made to allow loading previously-compiled code, thereby reducing the partially-compiled program execution time. This is achieved by learning the program's partial call graph and guiding the compilation scheduling and loading decisions using this information. This research uses a WebAssembly runtime equipped with an AOT compiler to study the effects of the proposed algorithm. The AOT compiler uses Eclipse OMR-a language runtimes construction toolkit; but the proposed algorithm is independent of the target language and can also be used by other runtime construction toolkits. This paper includes a comparison of the execution times of a program compiled fully Ahead-of-Time and the proposed compilation scheduling algorithms. Using the proposed approach significantly reduces the maximum time taken by the compilation runs in most cases and reaches a peak performance similar to the traditional AOT compilation approach.
No takes yet. Share an insight, caveat, or question.
Krylov et al. (2024) studied this question.
Synapse has enriched 3 closely related papers on similar clinical questions. Consider them for comparative context: