Ladybird's October Update Ships a JavaScript JIT, Rewrites Its WebAssembly Engine, and Passes Safari Technology Preview on WPT
Ladybird's October report describes a new JavaScript JIT, a Rust-based WebAssembly engine 7.3x faster on shared JetStream 3 workloads, and a Web Platform Tests score ahead of Safari Technology Preview.
Overview
Ladybird, the independent open-source browser project, published its October progress report on October 31, describing a new just-in-time (JIT) compiler for JavaScript, a rewritten WebAssembly engine, and a Web Platform Tests (WPT) score that overtook Safari Technology Preview. According to the Ladybird newsletter, the project also moved style and layout computation off the browser’s main thread and redesigned its user interface. As previously reported, Ladybird has been issuing monthly reports as it works toward an alpha release.
A JavaScript JIT, after years without one
LibJS, Ladybird’s JavaScript engine, now compiles frequently run code to machine code on Linux and macOS, for both x86-64 and AArch64, according to the newsletter. The project said it had previously decided against building a JIT and instead tuned its interpreter, but concluded that approach had reached its limits: making the interpreter twice as fast, the newsletter said, would “only turn a 300ms hang into a 150ms hang, which you’d still notice.” The newsletter describes the JIT’s design as “deliberately boring: speculative optimization based on runtime type profiling, like other JavaScript engines,” where the engine records the types and object shapes it observes while code warms up and uses those recordings to make assumptions, such as that a value is always an integer, and to inline small functions. To catch bugs, the team said it “used a fuzzer that ran the same code in the JIT and the interpreter and compared the results.”
A pull request merged to the Ladybird repository on October 11 turned the JIT on by default in builds that include it, with an environment variable available to disable it. Across the month, the newsletter reported gains on several benchmarks: Speedometer 2 rose from 84 to 156, Speedometer 3 rose from 5.9 to 8.6, and Octane improved 4.7 times over, with a step up when the JIT was switched on.
WebAssembly engine rewritten in Rust
Ladybird also replaced its WebAssembly engine. The newsletter said the project swapped out its previous C++ engine and Cranelift compiler backend for “a new engine that has its own interpreter and JIT,” built in Rust, which adds support for WebAssembly features the old engine lacked, including exception handling and garbage collection. The merged pull request that carried out the replacement, dated October 22, describes the new engine’s interpreter as written in Flap, a language the newsletter said the project built in July for LibJS’s own interpreter; the pull request adds that a single Flap source builds the interpreter for x86-64, AArch64 and Windows x64.
On performance, the two sources give figures at different levels of precision. The newsletter says that on the JetStream 3 WebAssembly workloads both engines can run, the new engine “scores about 7x higher.” The pull request itself is more specific: of JetStream 3’s 19 WebAssembly workloads, the old engine failed eight, and on the 11 workloads both engines could complete, the new engine scored 7.3 times higher by geometric mean, according to the pull request’s own benchmark table. Separately, the newsletter reported that Wasm CoreMark improved 2.5 times over the month, with a jump when the new engine landed, and that JSLinux, an x86 PC emulator that runs inside the browser, now boots Alpine Linux to a shell in 1.8 seconds, compared with 1.5 seconds in Chrome, by the newsletter’s own account.
Passing Safari Technology Preview on Web Platform Tests
Ladybird said it passed Safari Technology Preview on the Web Platform Tests suite on October 26, ending the month at 2,184,722 passing subtests, a gain of 75,650 over the month, according to the newsletter. The newsletter put the other three browsers’ month-end subtest counts at 2,244,397 for Chrome, 2,189,315 for Firefox, and 2,172,990 for Safari Technology Preview. Ladybird said most of its October gain came in a five-day span, from roughly 2.12 million subtests on October 22 to roughly 2.18 million on October 27, and that it reached that gain by pointing AI coding agents at the WPT suite and asking them to fill in missing functionality, with its largest single-category gains at about 30,000 subtests in the /css test directory and about 10,000 in /editing. These Web Platform Tests figures and the October 26 milestone come solely from Ladybird’s own newsletter; the project did not cite third-party confirmation of the ranking in the report.
Other changes: threading, UI, and Rust migration
The October report also describes moving style computation, layout, and paint recording off the browser’s main thread and onto separate threads that run concurrently with JavaScript, which the newsletter said lets CSS animations and :hover effects keep updating while a long script runs, something the project described as a capability that “as far as we know, no other browser can do this today,” a claim that comes from Ladybird itself rather than from independent testing. The team also shipped a redesigned browser UI with light, dark, and a violet dark theme for private windows, along with tab pinning, cross-tab search, and window restoration on launch, per the newsletter. Separately, the newsletter said LibJS’s runtime had already moved from C++ to Rust shortly before the JIT landed, leaving the JavaScript engine “all Rust, apart from its flap interpreter and the garbage collector,” with the new WebAssembly engine, WebGL, 2D canvas, IndexedDB, Streams and URL handling, and style computation also converted to Rust during the month. Ladybird said its first alpha release is planned for later this year.