Closed Bug 1744208 Opened 1 year ago Closed 1 year ago

Change the nursery's object/string fix-up lists to add to the front


(Core :: JavaScript: GC, task, P3)




96 Branch
Tracking Status
firefox96 --- fixed


(Reporter: jandem, Assigned: jandem)



(1 file)

We currently add objects/strings we tenure to the end of a list, but we pop objects/strings to fix up from the front of that list.

It seems better to add to the front instead, because:

  • We can then usually fix up objects/strings shortly after moving them, so they're more likely to still be in the cache.
  • Nursery objects are likely to refer to objects that are close to it in memory. By adding and removing at the front, we take more advantage of this which also improves cache locality.
  • It's easier to implement.

All of these are good reasons. I'm interested to see what difference this makes.

This seems to have better cache locality on typical workloads, because objects
that are tenured are now more likely to be fixed up shortly after. It's also easier
to implement.

Some benchmarks (Speedometer, ARES6, various Octane subtests like TypeScript) improve
a bit so this seems worth trying to see how it affects telemetry data in the browser.

Pushed by
Change the nursery's fix-up lists to add items to the front instead of back. r=jonco
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch

Looking at the GLAM telemetry dashboard, this improved the gc_minor_us 99% percentile by 13.87%. The other percentiles didn't change.

You need to log in before you can comment on or make changes to this bug.