Hacker News new | ask | show | jobs
by bengali3 4309 days ago
nice. Shows why forcing GC frequently can be counter productive, esp with the copy collector
1 comments

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.