4 ms·
>RC is nothing new, it was the very first GC algorithm being implemented, there are many reasons why GC research moved beyond it. It's not about RC, it's about
by coldtea 10y ago
>RC is nothing new, it was the very first GC algorithm being implemented, there are many reasons why GC research moved beyond it.
It's not about RC, it's about the A in ARC.
- deleted 10y ago[deleted]
- int_19h 10y agoYou can replace "RC" with "ARC" in the comment above, and it will be just as valid. Python has used automatic reference counting for ages, for example.
- kibwen 10y agoAFAIK the secret sauce of ARC is supposed to be the ability to elide retain/release calls when the compiler can prove that they're not needed, which sounds analogous to the escape analysis used in many garbage collectors.
- Joky 10y agoThere is a major difference: 1) it is static and 2) it provides totally stable and reproducible performance behavior.
- kibwen 10y agoEscape analysis is also static and deterministic (which doesn't mean that changes to the code can't cause the optimization to stop happening without warning, but the same is true of retain/release elision).
- theseoafs 10y agoWhy are you under the impression that what Apple calls "ARC" is substantially different than reference counting?
- pjmlp 10y agoThe A in ARC is plain marketing speak for those that don't have any clue about compiler optimizations in RC implementations. Removing redundant increment/decrements was a well known optimization long before Apple added that A to RC.
- penpapersw 10y agoNo, the A in ARC means you don't have to write retain/release yourself anymore, the compiler inserts these calls for you. Very different concept from the optimization you're describing.
- pjmlp 10y agoI fail to see the difference to any other RC implementation, including how languages like VB handled COM RC in the 90's or some of the early Lisp implementations. What is the technical difference at implementation level?
- euyyn 10y agoIt is like VB 5/6's RC. And it is unlike RC implementations in which the programmer has to write the retains and releases. It is not, though, a compiler optimization.
- euyyn 10y agoNo, the A in ARC doesn't refer to the compiler removing redundant retains/releases. It refers to the programmer not having to write a single one in the first place.