Closed Bug 1744208 Opened 3 years ago Closed 3 years ago

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

Categories

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

task

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: jandem, Assigned: jandem)

Details

Attachments

(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 jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a3c49e8fb9b8
Change the nursery's fix-up lists to add items to the front instead of back. r=jonco
Status: ASSIGNED → RESOLVED
Closed: 3 years 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.

Attachment

General

Created:
Updated:
Size: