|
|
Subscribe / Log in / New account

GCC's dialect of C++

GCC's dialect of C++

Posted Mar 31, 2017 16:57 UTC (Fri) by smckay (guest, #103253)
In reply to: GCC's dialect of C++ by roc
Parent article: GCC for new contributors

When Apple says ARC they mean automatic refcounting, with the compiler calling retain/release instead of the programmer. It's actually their second attempt at eliminating manual refcounting; first there was a GC mode of the ObjC runtime, which was swiftly deprecated and I don't think even exists anymore. Going by https://clang.llvm.org/docs/AutomaticReferenceCounting.html, atomic ops are used for weak references but not otherwise. Section 6 specifically calls out that using atomic ops pervasively would kill performance.


to post comments

GCC's dialect of C++

Posted Apr 6, 2017 1:22 UTC (Thu) by nix (subscriber, #2304) [Link]

AIUI, frequently the refcounts are eliminated entirely -- which is a good thing, because a refcount change is a memory write, and memory writes are comparatively expensive these days (particularly but not only for cross-core-shared things).


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds