2 ms·
Yeah but it depends on the structure of the program right? Many swift programs might have a handful of reference counted objects which are not used in the perf
by skohan 6y ago
Yeah but it depends on the structure of the program right? Many swift programs might have a handful of reference counted objects which are not used in the performance-critical section of the program so the ARC penalty is negligible.
I agree that ARC is probably an obstacle for Swift to overcome in the long term. There have been some interesting discussions in the Swift forums around this, and there may be some solutions, like for instance the compiler being smarter about knowing when ARC is truly necessary, and replacing it with simple RC when, for instance, an object never leaves the thread where it was created, which is probably true of a majority of objects.
Probably this can be addressed when Swift's ownership model is more mature, and when the concurrency model has been formally defined.