Hacker News new | ask | show | jobs
by beagle3 5233 days ago
[citation needed]

Depending on how many cores you use, what processor you use, and other use cases (e.g. copy-on-write, which is free with RC and super expensive with GC), one of them can be significantly faster than the other. But for a non-specific use case, it has been my experience that they are roughly equivalent.

The place where GC consistently excels is the "no random pauses" - most GCs will occasionally need to stop the world, even when they can mostly do incremental collections. Note that this does not mean they are slower - it is just that the overhead tends to be concentrated in bursts instead of uniformly spread out as in RC.

The place where RC consistently excels is reference loops, and less dependence on implementation robustness.

2 comments

Just reread, and I got the GC and RC mixed up there (thanks, chancho) too late to edit, so I'll repost a fixed version:

The place where RC consistently excels is the "no random pauses" - most GCs will occasionally need to stop the world, even when they can mostly do incremental collections. Note that this does not mean they are slower - it is just that the overhead tends to be concentrated in bursts instead of uniformly spread out as in RC.

The place where GC consistently excels is reference loops, and less dependence on implementation robustness.

You have a strange definition of "excel".
Thanks! I managed to get the two lines confused, not sure how, and it is too late to edit; just posted a correction:

The place where RC consistently excels is the "no random pauses" - most GCs will occasionally need to stop the world, even when they can mostly do incremental collections. Note that this does not mean they are slower - it is just that the overhead tends to be concentrated in bursts instead of uniformly spread out as in RC.

The place where GC consistently excels is reference loops, and less dependence on implementation robustness.