Ask for help when encountering GC issues (was Re: Garbage Collection woes...)
Ask for help when encountering GC issues (was Re: Garbage Collection woes...)
- Subject: Ask for help when encountering GC issues (was Re: Garbage Collection woes...)
- From: Chris Hanson <email@hidden>
- Date: Sat, 28 Jun 2008 21:23:11 -0700
On Jun 27, 2008, at 12:31 PM, John Engelhart wrote:
Lesson #1: If you have any interest in performance, you must avoid,
at all costs, "writing" to a __strong pointer.
If this were the case, all assignments to instance variables would be
exceptionally costly under GC. They are not -- applications run under
GC can get quite good performance. Assignment through write barriers
does have a cost, yes, but that cost is amortized by the fact that the
GC system can use the generation information provided by using write
barriers to be more efficient.
Furthermore *every* assignment to an object pointer is effectively a
__strong assignment. If your performance assumptions were true in the
general case, you might expect to see everything that runs under GC
perform at a fraction the speed it runs under non-GC, which isn't the
case for the large application I work on.
And thus began yet another exciting adventure with the GC system
that caused me to waste several days.
You could ask for help on the list sooner rather than spending days
and days beating your head against something like this...
I'll reiterate what I've said in the past, though: Objective-C
Garbage Collection works quite well in Leopard, and applications large
and small can use it quite effectively. I generally don't create new
Cocoa projects these days without turning on Objective-C GC support.
If you encounter bugs, file them.
-- Chris
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden