Abstract

Подходы к оптимизации движка JavaScript V8

Highlights

  • JavaScript is one of the most popular programming languages in the world [1]

  • The project was quite time limited, we achieved about 10% total performance improvement compared to open source version

  • For this purpose V8 one more time recompiles selected function in Abstract Syntax Tree (AST) form. In this case it performs optimizations. It compiles AST into Static Single Assignment (SSA) form and propagates type information collected by Polymorphic Inline Cache (PIC) along SSA edges

Read more

Summary

Introduction

JavaScript is one of the most popular programming languages in the world [1]. Started as a simple scripting language for web browsers it becomes language of choice for millions of engineers in the web, mobile and server-side development. One example of modern high-performing JavaScript engine is a V8 engine [2] used in Google Chrome browser and node.js web server among others. This is an open source project which implemented some advanced optimization methods including Just-in-Time compilation [3], Polymorphic Inline Caches [4], optimized recompilation of hot code regions, On Stack Replacement [5] &c. In previous year we were involved in project of optimizing performance of V8 JavaScript engine on major benchmark suites including Octane [6], SunSpider [7] and Kraken [8].

V8 engine architecture
Approaches to speed up V8 engine
Optimized build
Runtime parameters tuning
Scalar optimizations
Algebraic Simplification
Common Subexpression Elimination
Fast call frame for ARM
Findings
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call