Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3314221.3314587acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Reusable inline caching for JavaScript performance

Published: 08 June 2019 Publication History

Abstract

JavaScript performance is paramount to a user’s browsing experience. Browser vendors have gone to great lengths to improve JavaScript’s steady-state performance. This has led to sophisticated web applications. However, as users increasingly expect instantaneous page load times, another important goal for JavaScript engines is to attain minimal startup times.
In this paper, we reduce the startup time of JavaScript programs by enhancing the reuse of compilation and optimization information across different executions. Specifically, we propose a new scheme to increase the startup performance of Inline Caching (IC), a key optimization for dynamic type systems. The idea is to represent a substantial portion of the IC information in an execution in a context-independent way, and reuse it in subsequent executions. We call our enhanced IC design Reusable Inline Caching (RIC). We integrate RIC into the state-of-the-art Google V8 JavaScript engine and measure its impact on the initialization time of popular JavaScript libraries. By recycling IC information collected from a previous execution, RIC reduces the average initialization time per library by 17%.

References

[1]
Keith Adams, Jason Evans, Bertrand Maher, Guilherme Ottoni, Andrew Paroski, Brett Simmers, Edwin Smith, and Owen Yamauchi. 2014. The Hiphop Virtual Machine. In Proceedings of the 2014 ACM International Conference on Object Oriented Programming, Systems, Languages & Applications (OOPSLA '14). ACM, New York, NY, USA, 777-790.
[2]
Wonsun Ahn, Jiho Choi, Thomas Shull, Maria J. Garzaran, and Josep Torrellas. 2014. Improving JavaScript Performance by Deconstructing the Type System. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '14). ACM, NewYork, NY, USA, 496-507.
[3]
Akamai Technologies. 2014. Performance Matters: 9 Key Consumer Insights.
[4]
AngularJS. 2019. https://angularjs.org/.
[5]
Chromium Blog. 2015. New JavaScript techniques for rapid page loads. https://blog.chromium.org/2015/03/new-javascript-techniques-for-rapid.html.
[6]
V8 Blog. 2015. Custom startup snapshots. https://v8.dev/blog/custom-startup-snapshots.
[7]
V8 Blog. 2018. Improved code caching. https://v8.dev/blog/improved-code-caching.
[8]
V8 Blog. 2019. V8 JavaScript Engine. https://v8.dev/.
[9]
CamanJS. 2016. http://camanjs.com/.
[10]
Craig Chambers, David Ungar, and Elgin Lee. 1989. An Efficient Implementation of SELF, a Dynamically-typed Object-oriented Language Based on Prototypes. In Conference Proceedings on Object-oriented Programming Systems, Languages and Applications (OOPSLA '89). ACM, New York, NY, USA, 49-70.
[11]
L. Peter Deutsch and Allan M. Schiffman. 1984. Efficient Implementation of the Smalltalk-80 System. In Proceedings of the 11th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL '84). ACM, New York, NY, USA, 297-302.
[12]
MDN Web Docs. 2019. Standard built-in objects. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects.
[13]
Google. 2017. Octane Benchmark. https://developers.google.com/octane/.
[14]
Google. 2018. PageSpeed Module. https://developers.google.com/speed/pagespeed/module/.
[15]
Handlebars. 2019. http://handlebarsjs.com/.
[16]
Urs Hölzle, Craig Chambers, and David Ungar. 1992. Debugging Optimized Code with Dynamic Deoptimization. In Proceedings of the ACM SIGPLAN 1992 Conference on Programming Language Design and Implementation (PLDI '92). ACM, New York, NY, USA, 32-43.
[17]
jQuery. 2019. http://jquery.com.
[18]
JSFeat. 2018. http://inspirit.github.io/jsfeat/.
[19]
Jupiter Research. 2006. Retail web site performance: Consumer reaction to a poor online shopping experience.
[20]
Madhukar N. Kedlaya, Behnam Robatmili, and Ben Hardekopf. 2015. Server-side Type Profiling for Optimizing Client-side JavaScript Engines. In Proceedings of the 11th Symposium on Dynamic Languages (DLS 2015). ACM, New York, NY, USA, 140-153.
[21]
David Lion, Adrian Chiu, Hailong Sun, Xin Zhuang, Nikola Grcevski, and Ding Yuan. 2016. Don't Get Caught in the Cold, Warm-up Your JVM: Understand and Eliminate JVM Warm-up Overhead in Data-Parallel Systems. In 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI '16). USENIX Association, Savannah, GA, 383-400.
[22]
Chi-Keung Luk, Robert Cohn, Robert Muth, Harish Patil, Artur Klauser, Geoff Lowney, Steven Wallace, Vijay Janapa Reddi, and Kim Hazelwood. 2005. Pin: Building Customized Program Analysis Tools with Dynamic Instrumentation. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '05). ACM, NewYork, NY, USA, 190-200.
[23]
Bryan McQuade, Doantam Phan, and Mona Vajihollahi. 2013. Instant Mobile Websites: Techniques and Best Practices. Google I/O '13.
[24]
JinSeok Oh and Soo-Mook Moon. 2015. Snapshot-based Loading-time Acceleration for Web Applications. In Proceedings of the 13th Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO '15). IEEE Computer Society, Washington, DC, USA, 179-189.
[25]
Guilherme Ottoni. 2018. HHVM JIT: A Profile-guided, Region-based Compiler for PHP and Hack. In Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2018). ACM, New York, NY, USA, 151-165.
[26]
Paruj Ratanaworabhan, Benjamin Livshits, and Benjamin G. Zorn. 2010. JSMeter: Comparing the Behavior of JavaScript Benchmarks with Real Web Applications. In Proceedings of the USENIX Conference on Web Application Development (WebApps'10). USENIX Association, Berkeley, CA, USA, 3-3.
[27]
React. 2019. https://facebook.github.io/react/.
[28]
Carroll Rheem. 2010. Consumer Response to Travel Site Performance. https://www.phocuswright.com/Free-Travel-Research/Consumer-Response-to-Travel-Site-Performance. PhoCusWright.
[29]
Underscore. 2018. http://underscorejs.org/.
[30]
Toon Verwaest and Camillo Bruni. 2016. Real-world JavaScript Performance. https://docs.google.com/presentation/d/14WZkWbkvtmZDEIBYP5H1GrbC9H-W3nJSg3nvpHwfG5U/edit?usp=sharing.
[31]
Xiaoran Xu, Keith Cooper, Jacob Brock, Yan Zhang, and Handong Ye. 2018. ShareJIT: JIT Code Cache Sharing Across Processes and Its Practical Implementation. In Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications (OOPSLA '18). ACM, New York, NY, USA, 124:1-124:23.
[32]
Owen Yamauchi. 2015. Hack and HHVM: Programming Productivity Without Breaking Things (1st ed.). O'Reilly Media, Inc.
[33]
Zona Research. 1999. The Economic Impacts of Unacceptable Web-Site Download Speeds. www.webperf.net/info/wp_downloadspeed.pdf.

Cited By

View all
  • (2024)Accelerating Page Loads via Streamlining JavaScript Engine for Distributed LearningInformation Sciences10.1016/j.ins.2024.120713(120713)Online publication date: May-2024
  • (2023)Stub Folding: Retaining Type Specialization to Increase the Efficiency of Highly Polymorphic Inline CachesProceedings of the 33rd Annual International Conference on Computer Science and Software Engineering10.5555/3615924.3615936(113-122)Online publication date: 11-Sep-2023
  • (2023)CacheIR: The Benefits of a Structured Representation for Inline CachesProceedings of the 20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3617651.3622979(34-46)Online publication date: 19-Oct-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI 2019: Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2019
1162 pages
ISBN:9781450367127
DOI:10.1145/3314221
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 08 June 2019

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Dynamic Typing
  2. Inline Caching
  3. JavaScript
  4. Scripting Language

Qualifiers

  • Research-article

Conference

PLDI '19
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)42
  • Downloads (Last 6 weeks)6
Reflects downloads up to 16 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Accelerating Page Loads via Streamlining JavaScript Engine for Distributed LearningInformation Sciences10.1016/j.ins.2024.120713(120713)Online publication date: May-2024
  • (2023)Stub Folding: Retaining Type Specialization to Increase the Efficiency of Highly Polymorphic Inline CachesProceedings of the 33rd Annual International Conference on Computer Science and Software Engineering10.5555/3615924.3615936(113-122)Online publication date: 11-Sep-2023
  • (2023)CacheIR: The Benefits of a Structured Representation for Inline CachesProceedings of the 20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3617651.3622979(34-46)Online publication date: 19-Oct-2023
  • (2022)Profile Guided Offline Optimization of Hidden Class Graphs for JavaScript VMs in Embedded SystemsProceedings of the 14th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages10.1145/3563838.3567678(25-35)Online publication date: 29-Nov-2022
  • (2021)Of JavaScript AOT compilation performanceProceedings of the ACM on Programming Languages10.1145/34735755:ICFP(1-30)Online publication date: 19-Aug-2021
  • (2020)Hidden inheritance: an inline caching design for TypeScript performanceProceedings of the ACM on Programming Languages10.1145/34282424:OOPSLA(1-29)Online publication date: 13-Nov-2020
  • (2020)An Optimization Method of Javascript Redundant Code Elimination based On Hybrid Analysis Technique2020 17th International Computer Conference on Wavelet Active Media Technology and Information Processing (ICCWAMTIP)10.1109/ICCWAMTIP51612.2020.9317462(300-305)Online publication date: 18-Dec-2020

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media