Hello Everyone,
It’s Matt here from the SpiderMonkey team, with another newsletter for you. I hope you’re enjoying summer/winter. The last heatwave where I am broke on Thursday evening, with a dramatic drop in temperatures driven by the arrival of a thunderstorm. Unfortunately for me, it seems to be back for round two this week.
In SpiderMonkey land we’ve been hard at work on a number of things, but you’ll see from this abbreviated blog that we do tend to slow down a bit in the middle of the year as vacations build up.
In June of this year Mozilla, in collaboration with Aalto University hosted the 102nd meeting of TC39 in Helsinki, Finland. I was actually able to attend this meeting in person, which was really interesting to me. On the one hand, seeing how JavaScript is standardized from such an intimate viewpoint was extremely eye-opening. On the other hand, Helsinki was also just wonderful.
🚉 SpiderMonkey Platform Improvements
- Work is underway to smooth the sharing of string contents across Gecko and SpiderMonkey, tracked under Bug 1892253 - Use a shared string buffer type for JS and DOM strings. The intention of this work is to reduce the overhead and copying required when strings cross from SpiderMonkey into Gecko and back.
🔦 Contributor Spotlight
This Newsletter’s Contributor Spotlight focuses on Debadree Chatterjee! In his own words,
A fully stack js dev mostly working with react and nodejs with a newfound interest in learning about JS runtimes and JIT compilers, Initially exposed to workings of jit compilers when studying nodejs internals and from there still going down the rabbit hole of exploring js engines :-)
He is on an ongoing quest to implement Explicit Resource Management, and has made great progress. Thank you so much for all your work Debadree, and I hope to keep hearing from you as a contributor over time!
🧑🏾🏫 Mentored Bugs
Are you curious about what it would be like to contribute to SpiderMonkey, but not sure what kind of work is hanging around? This section, new for this newsletter, highlights a few of our bugs which have mentors assigned that we think would be interesting for newish contributors to tackle. Not all our Mentored bugs are in equally good shape to have new contributors jump on, but the following are pretty safe bets
- Bug 1899303 - Implement Redeclarable global eval-introduced vars proposal
- Bug 1899413 - Support v flag in RegExp.prototype[@@matchAll]
Before jumping on any of these, be sure to stop in at #spidermonkey on Matrix to get the current lay of the land.
🚀 Performance
- Jon landed Bug 1900778 - JitHits can prevent pretenuring allocations, which ensures that our
JitHints
machinery doesn’t interfere with our allocation site tracking machinery; this lead to a 9% improvement on one of our tests. - Iain landed Bug 1895957 - Use emitCalleeGuard in GetPropIRGenerator::tryAttachScriptedProxy , which handles proxies where the handler uses function literals by checking the Script (our representation of code, which is shared here) rather than Functions, which will not be shared. This was a 5% improvement on the Speedometer 3 ChartJS test.
- Alex added support for getters in megamorphic GetElem / GetProp ICs.
- Not Firefox performance, but Jan fixed an issue where the runtime of one of our test suites wasn’t scaling with increased CPU cores.
- Jon made it possible for us to nursery allocate built-in proxy types in the nursery, leading to performance improvements of up to 30% on some SP3 subtests.
🕸️ Features
- Dan added support for Duplicate Named Capture groups
- Dan worked on shipping Resizable and Growable ArrayBuffers, originally implemented by André Bargull.