Skip to content

Comment on Generational Garbage Collection in Firefox

Comments

Googlers at I/O explain how this works in V8. Click on "View the presentation" and then from slide 23 onwards.

https://developers.google.com/events/io/sessions/325547004

The main difference from what is shown in those slides is that V8 uses a semispace collector. The SpiderMonkey collector just has a single nursery.

Jon Coppeard implemented a semispace collector for SpiderMonkey, but the added complexity made it a net loss in performance. So we scrapped it for now. It means we get a few objects unfairly tenured, but our measurements showed the actual number was pretty low and not worth the overhead.

It's totally workload dependent, and further GGC tuning (there's a lot to go!) may reverse that balance.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.