Extending Basic Block Versioning with Typed Object Shapes
Maxime Chevalier-Boisvert, Marc Feeley

TL;DR
This paper presents two techniques, typed shapes and shape propagation, to reduce dynamic checks in JavaScript engines, significantly improving performance and code size in a JIT compiler.
Contribution
It introduces typed shapes and shape propagation methods that effectively eliminate redundant property checks, enhancing JavaScript JIT compilation efficiency.
Findings
48% reduction in type tests on average
17% smaller code size
25% faster execution times
Abstract
Typical JavaScript (JS) programs feature a large number of object property accesses. Hence, fast property reads and writes are crucial for good performance. Unfortunately, many (often redundant) dynamic checks are implied in each property access and the semantic complexity of JS makes it difficult to optimize away these tests through program analysis. We introduce two techniques to effectively eliminate a large proportion of dynamic checks related to object property accesses. Typed shapes enable code specialization based on object property types without potentially complex and expensive analyses. Shape propagation allows the elimination of redundant shape checks in inline caches. These two techniques combine particularly well with Basic Block Versioning (BBV), but should be easily adaptable to tracing Just-In-Time (JIT) compilers and method JITs with type feedback. To assess 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.
Taxonomy
TopicsLogic, programming, and type systems · Model-Driven Software Engineering Techniques · Parallel Computing and Optimization Techniques
