Menu
Google boosts V8 JavaScript performance

Google boosts V8 JavaScript performance

‘Super-fast’ non-optimising Sparkplug compiler, which compiles bytecode to machine code, makes its debut in V8 9.1 and Chrome 91.

Credit: Dreamstime

With the Sparkplug compiler, Google is looking to improve JavaScript performance in its Chrome browser. Sparkplug is debuting in Chrome 91.

Featured as part of Chrome’s V8 JavaScript/WebAssembly engine, Sparkplug is positioned as a “super-fast” non-optimising compiler. In a bulletin published May 27, Sparkplug is described as part of a compiler pipeline, nestled between the Ignition interpreter and the TurboFan optimising compiler.

Sparkplug compiles from bytecode rather than from JavaScript source. In other words, Sparkplug compiles functions that already have been compiled to bytecode; the bytecode compiler already having done work such as variable resolution, determining if parentheses actually are arrow functions, and desugaring destructuring statements.

And unlike most compilers, Sparkplug does not generate any intermediate representation. Instead, it compiles directly to machine code via a single linear pass over the bytecode, emitting code that matches the execution of that bytecode. The entire compiler is a switch statement inside a for loop that dispatches machine code generation functions.

Google’s V8 developers noted that, since 2016, they have moved away from tracking synthetic benchmarks, such as Octane, to measuring real-world performance of JavaScript outside of the optimising compiler.

Thus, the team has been working on several other aspects of V8 including the parser, streaming, the object model, and caching compiled code.


Follow Us

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Tags Googlejavascript

Featured

Slideshows

Channel gathers for Nextgen New Zealand's Summer (Somewhere) Party

Channel gathers for Nextgen New Zealand's Summer (Somewhere) Party

Held in Auckland, Nextgen New Zealand's Summer (Somewhere) Party was an opportunity for celebration with a tangerine taste of summer. Nexgen's channel community seized the opportunity to catch-up with familiar faces and enjoy an in-person gathering.

Channel gathers for Nextgen New Zealand's Summer (Somewhere) Party
Show Comments