‘Super-fast’ non-optimizing Sparkplug compiler, which compiles bytecode to machine code, makes its debut in V8 9.1 and Chrome 91. Credit: Thinkstock 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-optimizing compiler. In a bulletin published May 27, Sparkplug is described as part of a compiler pipeline, nestled between the Ignition interpreter and the TurboFan optimizing 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 optimizing compiler. Thus, the team has been working on several other aspects of V8 including the parser, streaming, the object model, and caching compiled code. Related content analysis Beyond the usual suspects: 5 fresh data science tools to try today The mid-month report includes quick tips for easier Python installation, a new VS Code-like IDE just for Python and R users, and five newer data science tools you won't want to miss. By Serdar Yegulalp Jul 12, 2024 2 mins Python Programming Languages Software Development analysis Generative AI won’t fix cloud migration You’ve probably heard how generative AI will solve all cloud migration problems. It’s not that simple. Generative AI could actually make it harder and more costly. By David Linthicum Jul 12, 2024 5 mins Generative AI Artificial Intelligence Cloud Computing news HR professionals trust AI recommendations HireVue survey finds 73% of HR professionals trust AI to make candidate recommendations, while 75% of workers are opposed to AI making hiring decisions. By Paul Krill Jul 11, 2024 3 mins Technology Industry Careers how-to Safety off: Programming in Rust with `unsafe` What does it mean to write unsafe code in Rust, and what can you do (and not do) with the 'unsafe' keyword? The facts may surprise you. By Serdar Yegulalp Jul 11, 2024 8 mins Rust Programming Languages Software Development Resources Videos