Reusing the Optimized Code for JavaScript Ahead-of-Time Compilation

Author:

Park Hyukwoo1,Kim Sungkook1,Park Jung-Geun1,Moon Soo-Mook1

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

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3