SpiderMonkey is changing how Promise jobs (microtasks) are handled to improve performance. The job type is becoming opaque, storage responsibility is moving from embedders to the engine, and the interface for running jobs is changing. These changes allow reusing existing objects instead of allocating new ones for each job, resulting in up to 45% improvement on Promise-heavy benchmarks in Firefox. Embedders using custom job queues will need to update their code, though the changes are mostly mechanical. The work aims to be stabilized by Firefox 153 ESR.

5m read timeFrom spidermonkey.dev
Post cover image
Table of contents
What’s ChangingWhy Change?Is this it?An Apology

Sort: