Google says Chrome 91 has improved its performance by 23%

Google posted that through the new V8 JavaScript compiler Sparkplug and short builtins mechanisms, the recently updated Chrome 91 has achieved a 23% performance improvement.

First of all, in the Chrome browser, the V8 engine is responsible for JavaScript execution. It has multiple compilers and can make different trade-offs at various stages of JavaScript execution. Three years ago, Google introduced a two-tier compiler system consisting of Ignition and Turbofan. Ignition is a bytecode interpreter whose job is to start executing the JavaScript with as little delay as possible. Turbofan is the optimizing compiler that generates high-performance machine code based on information gathered during JavaScript execution; as a result, it starts up more slowly than Ignition’s bytecode compiler.

Chrome 91 performance

The new Sparkplug compiler strikes a balance between Ignition and Turbofan. It generates local machine code but does not rely on information collected when executing JavaScript code. This allows it to quickly start execution while still generating relatively fast code.

In addition, through the short-builtins mechanism, the V8 engine optimizes the location of the generated code in memory. When V8 generates specific CPU codes from JavaScript, it lays these codes in memory. This generated code will often call built-in functions. For some CPUs, calling functions far away from the generated code will cause the CPU internal optimization (such as branch prediction logic) to fail. Therefore, the short builtins mechanism copies the built-in functions to the same memory area as the generated code. This change has a particularly big impact on the new Apple M1 chip.

Finally, according to Chrome product manager Thomas Nattestad, through the Sparkplug compiler and short builtins mechanism, Chrome 91 performance has increased by 23%, saving more than 17 years of CPU time every day.