3 ms·
They’re not even close to the same thing though. ARC gives deterministic performance rather than GC’s effectively random pauses. Compare a UI framework that us
by ninkendo 9y ago
They’re not even close to the same thing though. ARC gives deterministic performance rather than GC’s effectively random pauses.
Compare a UI framework that uses garbage collection on the hot path to one that uses ARC, it’s night and day when it comes to smooth animations and responsiveness.
- pjmlp 9y agoChapter 5 of "The Garbage Collection Handbook". http://gchandbook.org http://gchandbook.org One of the most acclaimed references about GC algorithms in Computer Science. Reference counting is a GC implementation algorithm. What you call GC, is a tracing GC algorithm. Cycle collectors for reference counting GC algorithms are also described on the book.
- ninkendo 9y ago... thanks. I'm aware people call refcounting garbage collection. That doesn't make an equivalency, and (to use your terms) it doesn't make tracing GC and refcounting the same thing. You're being needlessly pedantic, plenty of people have conversations about "refcounting vs GC", do you always come in with an "aaaactually, refcounting is a kind of GC" whenever you hear the discussions?
- pjmlp 9y agoSurely, learnig concepts the wrong way is worse than not learnig them at all. Putting two algorithms that belong to the same domain, automatic memory management, against each other, tends to lead to conclusions that aren't necessarily correct. For example, any reference counting implementation that uses cycle collectors or hazardous pointers, has a partial tracing GC implementation as well.
- ninkendo 9y agoI know I’m feeding a troll right now, but you haven’t shown that anyone here has learned anything the wrong way other than using the word GC in a different way than the book you linked. Yes, refcounting is a kind of GC. Very nice, you’re very smart. But colloquially nearly everyone knows what everyone else is talking about when they say “this uses refcounting” or “that uses GC”. We all know what each other mean, you’re being incredibly tedious by correcting people’s use of a very common term. Basically: shut up, we get it.