3 ms·
I think you mean automatic reference counting (ARC) — and ARC happens at compile time as part of a static analysis pass. (The compiler is basically adding reta
by nivenhuh 3y ago
I think you mean automatic reference counting (ARC) — and ARC happens at compile time as part of a static analysis pass. (The compiler is basically adding retain/release code for you.)
At runtime, it’s functionally close(ish) to malloc/free and doesn’t carry much overhead.
- steveklabnik 3y agoIn my understanding, it’s both: you’re right about Automatic Reference Counting (ARC) being a compile time pass. But the reference counts that they use for said retain/release are atomic reference counted (ARC). ARC certainly helps ARC be more performant than ARC without ARC due to the elided traffic on the count. (lol)