Simple and Effective Type Check Removal through Lazy Basic Block Versioning
Maxime Chevalier-Boisvert, Marc Feeley

TL;DR
This paper presents lazy basic block versioning, a simple JIT technique that effectively removes redundant type checks in dynamic languages, improving performance without complex analyses.
Contribution
Introduces lazy basic block versioning, a novel, simple method for eliminating redundant type checks in JIT compilation of dynamic languages.
Findings
Eliminates 71% of type tests on average
Achieves up to 50% speedup in benchmarks
Generates more efficient code than TraceMonkey
Abstract
Dynamically typed programming languages such as JavaScript and Python defer type checking to run time. In order to maximize performance, dynamic language VM implementations must attempt to eliminate redundant dynamic type checks. However, type inference analyses are often costly and involve tradeoffs between compilation time and resulting precision. This has lead to the creation of increasingly complex multi-tiered VM architectures. This paper introduces lazy basic block versioning, a simple JIT compilation technique which effectively removes redundant type checks from critical code paths. This novel approach lazily generates type-specialized versions of basic blocks on-the-fly while propagating context-dependent type information. This does not require the use of costly program analyses, is not restricted by the precision limitations of traditional type analyses and avoids the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
