Improving JavaScript performance by deconstructing the type system
@article{Ahn2014ImprovingJP, title={Improving JavaScript performance by deconstructing the type system}, author={Wonsun Ahn and Jiho Choi and Thomas Shull and Mar{\'i}a Jes{\'u}s Garzar{\'a}n and Josep Torrellas}, journal={Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation}, year={2014} }
Increased focus on JavaScript performance has resulted in vast performance improvements for many benchmarks. However, for actual code used in websites, the attained improvements often lag far behind those for popular benchmarks. This paper shows that the main reason behind this short-fall is how the compiler understands types. JavaScript has no concept of types, but the compiler assigns types to objects anyway for ease of code generation. We examine the way that the Chrome V8 compiler defines…
Figures and Tables from this paper
40 Citations
Of JavaScript AOT compilation performance
- Computer ScienceProc. ACM Program. Lang.
- 2021
The design and implementation of an AoT JavaScript compiler is presented and techniques that have been either invented or adapted from other systems, to improve AoT JS compilation are evaluated.
Uncovering JavaScript Performance Code Smells Relevant to Type Mutations
- Computer ScienceAPLAS
- 2015
A tool JSweeter is developed to detect performance bugs incurred by type mutations based on the type evolution graphs extracted from program execution to identify performance issues hidden in such well developed benchmark programs.
Performance Issues and Optimizations in JavaScript: An Empirical Study
- Computer Science2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE)
- 2016
An empirical study of 98 fixed performance issues from 16 popular client-side and server-side JavaScript projects identifies eight root causes of issues and shows that inefficient usage of APIs is the most prevalent root cause.
Architectural Characterization of Client-side JavaScript Workloads & Analysis of Software Optimizations
- Computer Science
- 2015
An in-depth architectural characterization of a newer JavaScript benchmark suite, as well as a profile analysis of the popular JavaScript v8 runtime engine from Google, to illustrate the architectural impact of specific runtime optimizations.
JITProf: pinpointing JIT-unfriendly JavaScript code
- Computer ScienceESEC/SIGSOFT FSE
- 2015
JITProf, a profiling framework to dynamically identify code locations that prohibit profitable JIT optimizations, is presented and how to use the approach as a profiling technique that finds optimization opportunities in a program is shown.
Dynamic Analysis for JavaScript Code
- Computer Science
- 2018
This work extends Jalangi, a dynamic analysis framework based on source code instrumentation, and develops NodeSec, which is a dynamic instrumentation framework that traces and sandboxes the interactions between a Node.js program and the operating system.
TypeDevil: Dynamic Type Inconsistency Analysis for JavaScript
- Computer Science2015 IEEE/ACM 37th IEEE International Conference on Software Engineering
- 2015
To deal with the pervasiveness of polymorphic behavior in real-world JavaScript programs, this paper presents Type Devil, a mostly dynamic analysis that warns developers about variables, properties, and functions that have inconsistent types.
Reusable inline caching for JavaScript performance
- Computer SciencePLDI
- 2019
This paper proposes a new scheme to increase the startup performance of Inline Caching (IC) by enhancing the reuse of compilation and optimization information across different executions, and calls it Reusable InlineCaching (RIC), a key optimization for dynamic type systems.
Overhead of deoptimization checks in the V8 javascript engine
- Computer Science2016 IEEE International Symposium on Workload Characterization (IISWC)
- 2016
This work analyzed the frequency of conditional deoptimization checks and the performance impact of the associated conditional branch using the V8 Javascript engine running the Octane benchmarks, finding that removing these checks provides only a 2.2% performance improvement when running on a high performance Intel CPU, but a 4.6% performance improved on an Intel CPU optimized for low power consumption.
NoMap: Speeding-Up JavaScript Using Hardware Transactional Memory
- Computer Science2019 IEEE International Symposium on High Performance Computer Architecture (HPCA)
- 2019
This paper examines the code generated by a state-of-theart JavaScript compiler and finds that the code has a high frequency of Stack Map Points, and extends the compiler to generate hardware transactions around SMPs, and performs simple within-transaction optimizations enabled by transactions.
References
SHOWING 1-10 OF 18 REFERENCES
Fast and precise hybrid type inference for JavaScript
- Computer SciencePLDI 2012
- 2012
A hybrid type inference algorithm for JavaScript based on points-to analysis that is fast, in that it pays for itself in the optimizations it enables, and precise, generating information that closely reflects the program's actual behavior even when analyzing polymorphic code.
TypeCastor: demystify dynamic typing of JavaScript applications
- Computer ScienceHiPEAC
- 2011
TypeCastor is described, a new JavaScript engine that tries to investigate where and how much the dynamism really is in JavaScript applications, thus to demystify their dynamic typing behavior.
Automated construction of JavaScript benchmarks
- Computer ScienceOOPSLA '11
- 2011
JSBench is described, a flexible tool for workload capture and benchmark generation, and its use in creating eight benchmarks based on popular sites is demonstrated, showing that workloads created by JSBench match the behavior of the original web applications.
JSMeter: Comparing the Behavior of JavaScript Benchmarks with Real Web Applications
- Computer ScienceWebApps
- 2010
This paper evaluates the behavior of JavaScript web applications from commercial web sites and compares this behavior with the benchmarks, finding that the benchmarks are not representative of many real web Sites and that conclusions reached from measuring the benchmarks may be misleading.
Checked Load: Architectural support for JavaScript type-checking on mobile processors
- Computer Science2011 IEEE 17th International Symposium on High Performance Computer Architecture
- 2011
This paper proposes Checked Load, a low-complexity architectural extension that replaces software-based, dynamic type checking with four new ISA instructions that provide flexible and automatic type checks for memory operations, and whose implementation requires minimal hardware changes.
An analysis of the dynamic behavior of JavaScript programs
- Computer SciencePLDI '10
- 2010
An empirical study of the dynamic behavior of a corpus of widely-used JavaScript programs is performed, and how and why the dynamic features are used are analyzed.
The Eval That Men Do - A Large-Scale Study of the Use of Eval in JavaScript Applications
- Computer ScienceECOOP
- 2011
A large-scale study of the use of eval in JavaScript-based web applications is presented, providing statistics on the nature and content of strings used in eval expressions, as well as their provenance and data obtained by observing their dynamic behavior.
Dynamic parallelization of JavaScript applications using an ultra-lightweight speculation mechanism
- Computer Science2011 IEEE 17th International Symposium on High Performance Computer Architecture
- 2011
ParaScript is developed, an automatic runtime parallelization system for JavaScript applications on the client's browser that is able to achieve an average of 2.18× speedup over the Firefox browser using 8 threads on commodity multi-core systems, while performing all required analyses and conflict detection dynamically at runtime.
Dynamically accelerating client-side web applications through decoupled execution
- Computer ScienceInternational Symposium on Code Generation and Optimization (CGO 2011)
- 2011
This paper exploits the extra processing power in multicore systems to further improve the performance of trace-based execution of JavaScript programs and introduces ParaGuard to off-load guards to another thread, while speculatively executing the main trace.
On the benefits and pitfalls of extending a statically typed language JIT compiler for dynamic scripting languages
- Computer ScienceOOPSLA '12
- 2012
This work offers the first in-depth look at benefits and limitations of the repurposed JIT compiler approach, and believes the most common pitfall of existing RJIT compilers is not focusing sufficiently on specialization, an abundant optimization opportunity unique to dynamically typed languages.