From the linked post: > The performance penality is also much overblown, as people usually assume > that it is using a full blown mutex - which it is not. Unfortunately, the > situation is so bad that even GCC got it wrong (reported by me here).
Have to disagree with this statement. I have, more than once, spent some time tracking down severe performance issues in Pacifist, only to have it turn out that the problem was caused by an atomic property being accessed in a loop. In general, if a property might be changed while another thread is trying to access it, that’s something you should be aware of when designing the class, because a lot of the time, individual atomic properties aren’t going to solve all your threading issues on their own. And if the class *isn’t* going to be accessed from multiple threads at once, there’s no point taking the performance hit. There’s a reason that the “atomic properties” feature wasn’t included in Swift. Charles _______________________________________________ Do not post admin requests to the list. They will be ignored. Objc-language mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/objc-language/archive%40mail-archive.com This email sent to [email protected]
