Adding Ignition to the script execution pipeline opens up possibilities beyond reducing V8 memory overhead, according to McIlroy. “The Ignition pipeline has been designed to enable us to make smarter decisions about when to execute and optimize code to speed up loading web pages and reduce jank and to make the interchange between V8’s various components more efficient,” he said.
V8 and other engines leverage JiT compilation of script to native machine code for performance purposes. With V8, the script execution pipeline has conditions requiring complex machinery to switch between the baseline compiler and two other optimizing compilers: CrankShaft and TurboFan. With this process, “JiTed” machine code can consume lots of memory even if code is executed only once. Ignition, which can replace V8’s baseline compiler, executes code with less memory overhead and paves the way for a simpler script execution pipeline, McIlroy explained.
The interpreter uses low-level, architecture-independent macro-assembly instructions from TurboFan to generate bytecode handlers for op codes. TurboFan compiles instructions to the target architecture, providing low-level instruction selection and machine register allocation. “This results in highly optimized interpreter code, which can execute the bytecode instructions and interact with the rest of the V8 virtual machine in a low-overhead manner, with a minimal amount of new machinery added to the codebase,” said McIlroy.
Android devices with 512MB of memory or less and running the Chrome 53 browser should enable Ignition. “Results from early experiments in the field show that Ignition reduces the memory of each Chrome tab by around 5 percent,” McIlroy noted.