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}
}
  • Wonsun Ahn, Jiho Choi, J. Torrellas
  • Published 9 June 2014
  • Computer Science
  • Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation
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… 
Of JavaScript AOT compilation performance
  • M. Serrano
  • Computer Science
    Proc. ACM Program. Lang.
  • 2021
TLDR
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
TLDR
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
TLDR
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
TLDR
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
TLDR
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
TLDR
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
TLDR
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
TLDR
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
TLDR
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
TLDR
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.
...
1
2
3
4
5
...

References

SHOWING 1-10 OF 18 REFERENCES
Fast and precise hybrid type inference for JavaScript
TLDR
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
TLDR
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
TLDR
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
TLDR
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
TLDR
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
TLDR
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
TLDR
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
TLDR
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
  • M. Mehrara, S. Mahlke
  • Computer Science
    International Symposium on Code Generation and Optimization (CGO 2011)
  • 2011
TLDR
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
TLDR
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.
...
1
2
...