http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47012

--- Comment #4 from Nicola Pero <nicola at gcc dot gnu.org> 2010-12-19 19:12:33 
UTC ---
Yes, I was actually thinking about this, and you're right - it makes sense not
to use retain/autorelease! ;-)

'nonatomic' means that other threads are not involved.  Which also means that
the programmer calling the accessor has full control of what happens (there
aren't alternative flows of execution that may jump in); he should do the
retain/autorelease himself if there is a risk that something he does while
using the object returned may call the accessor setter and trigger a release of
the object; else, he can get away without a retain/autorelease and get a good
speedup.

And doing the same that Apple does is obviously helpful for portability.

So I made the change in subversion.

Thanks

PS: GCC is currently in bug-fixing mode only for 4.6 so we can't accept
non-bug-fix changes, but as soon as it reopens, you're very welcome to
contribute.  Faster method lookup sounds very exciting (and non-trivial).

Reply via email to