Affiliation:
1. Seoul National University, Seoul, Korea
Abstract
As web pages and web apps increasingly include heavy JavaScript code, JavaScript performance has been a critical issue. Modern JavaScript engines achieve a remarkable performance by employing tiered-execution architecture based on interpreter, baseline just-in-time compiler (JITC), and optimizing JITC. Unfortunately, they suffer from a substantial compilation overhead, which can take more than 50% of the whole running time. A simple idea to reduce the compilation overhead is ahead-of-time compilation (AOTC), which reuses the code generated in the previous run. In fact, existing studies that reuse the bytecode generated by the interpreter or the machine code generated by the baseline JITC have shown tangible performance benefits [12, 31, 41]. However, there has been no study to reuse the machine code generated by the optimizing JITC, which heavily uses profile-based optimizations, thus not easily reusable. We propose a novel AOTC that can reuse the optimized machine code for high-performance JavaScript engines. Unlike previous AOTCs, we need to resolve a few challenging issues related to reusing profile-based optimized code and relocating dynamic addresses. Our AOTC improves the performance of a commercial JavaScript engine by 6.36 times (max) and 1.99 times (average) for Octane benchmarks, by reducing the compilation overhead and by running the optimized code from the first invocation of functions. It also improves the loading time of six web apps by 1.28 times, on average.
Funder
Ministry of Science, ICT 8 Future Planning
Basic Science Research Program through the National Research Foundation (NRF) of Korea
Publisher
Association for Computing Machinery (ACM)
Subject
Hardware and Architecture,Information Systems,Software
Reference41 articles.
1. Alexa. 2018. The Top 500 Sites on the Web. Retrieved from https://www.alexa.com/topsites. Alexa. 2018. The Top 500 Sites on the Web. Retrieved from https://www.alexa.com/topsites.
2. Apple Inc. 2018. WebKit. Retrieved from https://webkit.org/. Apple Inc. 2018. WebKit. Retrieved from https://webkit.org/.
3. Apple Inc. 2018. WebKit JavaScriptCore. Retrieved from https://github.com/WebKit/webkit/tree/master/Source/JavaScriptCore. Apple Inc. 2018. WebKit JavaScriptCore. Retrieved from https://github.com/WebKit/webkit/tree/master/Source/JavaScriptCore.
4. Generalized just-in-time trace compilation using a parallel task farm in a dynamic binary translator
5. Process-shared and persistent code caches
Cited by
3 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Comparative Study of JavaScript and WebAssembly Derivatives in Browser Engines;2023 Intelligent Methods, Systems, and Applications (IMSA);2023-07-15
2. Profile Guided Offline Optimization of Hidden Class Graphs for JavaScript VMs in Embedded Systems;Proceedings of the 14th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages;2022-11-29
3. Dynamic Compilation for Transprecision Applications on Heterogeneous Platform;Journal of Low Power Electronics and Applications;2021-06-29