• Home
  • Search
  • Fast and precise hybrid type inference for JavaScript
  • Cite Icon29
  • https://doi.org/10.1145/2345156.2254094Copy DOI Icon

Fast and precise hybrid type inference for JavaScript

Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

JavaScript performance is often bound by its dynamically typed nature. Compilers do not have access to static type information, making generation of efficient, type-specialized machine code difficult. We seek to solve this problem by inferring types. In this paper we present a hybrid type inference algorithm for JavaScript based on points-to analysis. Our algorithm is fast , in that it pays for itself in the optimizations it enables. Our algorithm is also precise , generating information that closely reflects the program's actual behavior even when analyzing polymorphic code, by augmenting static analysis with run-time type barriers. We showcase an implementation for Mozilla Firefox's JavaScript engine, demonstrating both performance gains and viability. Through integration with the just-in-time (JIT) compiler in Firefox, we have improved performance on major benchmarks and JavaScript-heavy websites by up to 50%. Inference-enabled compilation is the default compilation mode as of Firefox 9.

Similar Papers
  • Conference Article
  • Citations43

The Devil is in the Constants: Bypassing Defenses in Browser JIT Engines

  • Jan 01, 2015
  • Michalis Athanasakis +4
  • Conference Article
  • Citations17

Briki: an optimizing Java compiler

  • Feb 23, 1997
  • M Cierniak +1
  • Conference Article
  • Citations8

Impact of virtual execution environments on processor energy consumption and hardware adaptation

  • Jun 14, 2006
  • Shiwen Hu +1
  • Conference Article
  • Citations42

A change impact analysis to characterize evolving program behaviors

  • Sep 01, 2012
  • Neha Rungta +2
  • Conference Article
  • Citations4

Localizing Program Errors via Slicing and Reasoning

  • Dec 01, 2008
  • Fei Pu +1
  • Conference Article
  • Citations9

Inferring Types by Mining Class Usage Frequency from Inline Caches

  • Aug 23, 2016
  • Nevena Milojković +3
  • Conference Article
  • Citations9

Exploiting Type Hints in Method Argument Names to Improve Lightweight Type Inference

  • May 01, 2017
  • Nevena Milojkovic +2
  • Conference Article
  • Citations10

A measurement-based performance analyzer for real-time programs

  • Mar 27, 1991
  • K.B Kenny +1
  • Conference Article
  • Citations3

The Cost of Speculation: Revisiting Overheads in the V8 JavaScript Engine

  • Nov 01, 2021
  • Alberto Parravicini +1
  • Conference Article
  • Citations97

Characterizing the memory behavior of Java workloads

  • Jun 01, 2001
  • Yefim Shuf +3
  • Research Article
  • Citations10

Characterizing the memory behavior of Java workloads

  • Jun 01, 2001
  • ACM SIGMETRICS Performance Evaluation Review
  • Yefim Shuf +3
  • Conference Article
  • Citations80

JITProf: pinpointing JIT-unfriendly JavaScript code

  • Aug 30, 2015
  • Liang Gong +2
  • Conference Article
  • Citations100

LaTTe: a Java VM just-in-time compiler with fast and efficient register allocation

  • Oct 12, 1999
  • Byungsun Yang +9
  • Conference Article
  • Citations8

Evaluation of trace inlining heuristics for Java

  • Mar 26, 2012
  • Christian Häubl +2
  • Conference Article
  • Citations21

JIT Leaks: Inducing Timing Side Channels through Just-In-Time Compilation

  • May 01, 2020
  • Tegan Brennan +2
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.