Matthew Gaudet here from the SpiderMonkey team, giving Jan a break from newsletter writing.
Our newsletter is an opportunity to highlight some of the work that’s happened in SpiderMonkey land over the last couple of releases. Everyone is hard at work (though some of us are nicely rejuvenated from a winter break).
Feel free to email feedback on the shape of the newsletter to me, as I’d be interested in hearing what works for people and what doesn’t.
We’re continuing work on our performance story, with Speedometer 3 being the current main target. We like Speedometer 3 because it provides a set of workloads that we think better reflect the real web, driving improvements to real users too.
Here is a curated selection of just some of the performance related changes in this release:
- Iain Ireland improved performance on React through eager atomization of property keys (13% improvement on a devtools benchmark subtest, 7% on Jetstream2-Offfline Assembler).
- Contributor André Bargull improved the performance of various String methods (Between 2 and 5% on various Jetstream2 Subtests)
- Jon fixed an accidentally quadratic traversal in Bug 1867453 - Nightly spends tons of time (2 minutes+) around GC on an online OCR tool. The time increases exponentially as the size of the image increases
- I added a new optimization system called Fuses, which will allow us to make optimizations that depend on assumptions about the state of the virtual machine. The first optimization to make use of this landed in 123. While it wasn’t a noticeable improvement for Speedometer, it does provide about a 40% improvement on a destructuring microbenchmark. The hope is that this framework will be a foundation to build further improvement upon.
🔦 Contributor Spotlight: Mayank Bansal
Mayank Bansal has been a huge help to the Firefox project for years. Taking a special interest in performance, he is often one of the first to take note of a performance improvement or regression. He also frequently files performance bugs, some of which have identified fixable problems, along with comparative profiles which smooth the investigative process.
In his own words:
The SpiderMonkey team greatly appreciates all the help we get from Mayank. Thank you very much Mayank.
- Ben Visness enabled JIT Allocation of Structs, which helps improve Wasm GC performance by 5-15% depending on workload.
- Ryan Hunt implemented the js-string-builtin proposal championed by Mozilla for fast access to strings from wasm in Bug 1863794.
- Ryan also implemented the exnref proposal in Bug 1853454
👷🏽♀️ Other Work
- Contributor André Bargull has landed (nightly only) support for
- I enabled
ArrayBuffer.prototype.transferby default (but André Bargull did all the real work in implementing this). This API provides ownership semantics to JS ArrayBuffers.
- Contributor Jonatan Klemets has landed updates to our preliminary (disabled by default) support for Import Assertions.
- I fixed a low volume crash related to synchronous events occurring while devtools is open on a page; this should eventually avoid about 10 crashes a week for people debugging in Firefox. As of 121.0.1 this should no longer occur. This was a fun investigation triggered by a seemingly impossible crash, and also an interesting case of a crash-report bug opened by a bot leading to an actionable fix.
⏰ Date parsing improvements
Contributor Vinny Diehl has continued improving our date parsing story, aiming to improve compatibility and handling of peculiar cases.
- Bug 1862910 - Make Date.parse only check first 3 characters of month name
- Bug 1870434 - Date.parse rejects single numbers < 1000
- Bug 1872333 - Day of month overflow should be parsed as an ISO style date
- Bug 1870570 - Date.parse accepts incomplete time zone abbreviations and AM/PM
- Bug 1873186 - Deprecate day of week late in the format for Date.parse
In order to find bugs, fuzzing by generating and running random testcases to see if they crash turns out to be an unreasonably effective technique. The SpiderMonkey team works with a variety of fuzzers, both inside of Mozilla (👋 Hi
fuzzing@!) and outside (Thank you all!).
Fuzzing can find test cases which are both very benign but worth fixing, as well as extremely serious security bugs. Security sensitive fuzz bugs are eligible for the Mozilla Bug Bounty Program.
To show off the kind of fun we have with fuzzing, I thought I’d curate some fun, interesting (and not hidden for security reasons) fuzz bugs.