SpiderMonkey is the JavaScript engine used in Mozilla Firefox. This newsletter gives an overview of the JavaScript and WebAssembly work we’ve done as part of the Firefox 116 and 117 Nightly release cycles.
We’re working on improving performance for popular web frameworks such as React. We continue to make good progress, as you can see on this Speedometer 2 graph:
JSON.stringify
.Object.keys
to take advantage of cached for-in iterators if available.mprotect
for JIT code because this added significant performance overhead even
though bypasses have been commoditized and this didn’t significantly
impact attackers.We shipped some new JS features! 🎉
Intl.NumberFormat
version 3 by default (Firefox 117).We also implemented features that are still disabled by default:
Temporal
proposal.ArrayBuffer
transfer
proposal.We want to give a big shout-out 📣 to André Bargull (anba) who volunteered to implement many of these features. Especially Temporal is a very large feature: André landed more than a hundred patches for it!
High-level programming languages currently need to bring their own GC if they want to run on WebAssembly. This can result in memory leaks because it cannot collect cycles that form with the browser. The Wasm GC proposal adds struct and array types to Wasm so these languages can use the browser’s GC instead.
JSContext
type for helper threads. This is a large architectural improvement that unblocks exciting future improvements.