4 ms·
Reference counting may have flexibility advantages compared to tracing GC. Obligate reference counting (ala ObjC/Swift) vs. obligate tracing GC is not the only
by zozbot234 7y ago
Reference counting may have flexibility advantages compared to tracing GC. Obligate reference counting (ala ObjC/Swift) vs. obligate tracing GC is not the only relevant comparison.
- pjmlp 7y agoThe only flexibility is that is easier to implement, whence why it is usually the first GC algorithm one learns, and among the initial chapters of GC algorithms overview books.
- ckok 7y agoThe algorithm used here is a combination of both rc and tracing, it's not simple.
- pjmlp 7y agoThus making the point that in the end it always ends up being some form of tracing GC when performance matters.
- ckok 7y agoRight. To make RC work like a tracing GC (performant and without failing on circular references); it's going to be a combination. That said, there are a lot of interesting ideas in this that might be quite worth it. Like the article referenced, doesn't do a full heap scan, but makes a note of what is worth looking at.