Skip to content

Comment on Visualizing Garbage Collection Algorithms

Comments

nice. Shows why forcing GC frequently can be counter productive, esp with the copy collector

Pure 2-space copy collectors are very rare. Typically they are generational, so most GCs end up only copying recently allocated data (which is much more likely to be garbage).

In general though, the more frequently you GC, the more time you spend overall doing GC. This is part of why reference counted implementations tend to be slower (amortized) than other GC algorithms.

AboutSource Built by g1lg1l

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