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 118 to 121 Nightly release cycles.
The team wishes you Happy Holidays!
We’re working with other Firefox teams to improve performance for
popular web frameworks such as React. This work is largely driven by the
Speedometer 3 benchmark that Mozilla is collaborating on with other
browser vendors. The Performance Team recently gave a talk all about Speedometer 3 at the performance.now()
conference.
We can’t list all of our improvements here, but the list below covers some of this work.
Object.assign
.We also partially fixed a long-standing performance issue with the DevTools Web Console: if the JS code doesn’t use any of the special console variables, it will now run as fast as regular JS code on a website.
We’re shipping WebAssembly GC in Firefox 120! 🎉 This is a large feature that makes it possible for high-level languages to compile to WebAssembly and use the browser’s garbage collector. The Wasm GC proposal adds struct and array types to WebAssembly for this.
If you’re using Firefox 120 or later, you can try this demo of a Kotlin image viewer or this Dart/Flutter demo. Both of these use Wasm GC.
We’re also shipping Wasm tail calls in Firefox 121. This is an important feature for functional languages such as OCaml or Scheme that rely heavily on tail recursion.
We also shipped some new JS features in Firefox 119:
isWellFormed
and toWellFormed
methods on String.prototype
.[Object.groupBy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/groupBy)
and [Map.groupBy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/groupBy)
.Additionally we will be shipping the Promise.withResolvers
proposal in Firefox 121.
We implemented some features that are still disabled by default:
The JS language specification does not define which date/time formats
have to be accepted or rejected when converting strings to Date
objects. This has resulted in a number of web compatibility issues because there are subtle differences between the date parsers of most JS engines.
Vinny Diehl has volunteered to improve compatibility with other browsers. Here are just a few of these changes:
1-1-2024
.The release notes for Firefox 121 (and earlier versions) list more cases.