Caught between that rock and that hard place, the V8 team built Sparkplug. “Sparkplug is designed to compile fast. Very fast,” Swirski continued. “So fast, that we can pretty much compile whenever we want, allowing us to tier up to Sparkplug code much more aggressively than we can to TurboFan code.”
(Swirski’s post is recommended reading for those wanting a deeper technical dive, but he wrote it in such a way as even non-coders — such as, well, some Computerworld reporters — can understand it, or more accurately, understand most of it. Kudos.)
Benchmark results — also included in Swirski’s piece — indicate a performance boost of between 5% and 15%, depending on the OS and machine. Linux’s version of the Sparkplug-equipped Chrome showed the largest gain, macOS the smallest. On the latter, results from running the browser on an M1-equipped Mac were superior to those on Intel-based Macs. (Google’s claim that the latest Chrome is 23% faster was also based on short builtins, which it spelled out here.)
Other browsers jumped on the Sparkplug gravy train, too.
On May 25, the same day Google refreshed Chrome to v. 91 with the Sparkplug compiler, Microsoft — which was at the time hosting its all-online Build developers conference — declared that its Edge “will be the best performing browser on Windows 10 when Microsoft Edge version 91 releases.” (Microsoft launched Edge 91 on May 27.)
Microsoft based its claim on features it has added to its browser atop the Chromium-based foundation: a faster startup process that pre-loads parts of Edge before it’s opened by the user, and sleeping tabs, which immediately frees up device memory when a tab is no longer active and in the foreground.