Re: Garbage Collection Performance Hit
Re: Garbage Collection Performance Hit
- Subject: Re: Garbage Collection Performance Hit
- From: "Adam R. Maxwell" <email@hidden>
- Date: Wed, 31 Oct 2007 11:46:43 -0700
On Wednesday, October 31, 2007, at 11:32AM, "Chris Espinosa" <email@hidden> wrote:
>On Oct 31, 2007, at 10:43 AM, Robert Martin wrote:
>
>> I just finished converting a file scanning project to XCode 3, and
>> tried the GC. It worked without a hitch, except the performance took
>> a big hit. For example, a file that can be scanned at 1300 KB/Sec
>> without GC now averages 850 KB/sec with GC. Is this a typical
>> performance hit?
>
>File scanning can be a pathological case for GC as it involves rapid
>allocation and deallocation of large amounts of memory, and if you're
>not careful, reading in the files can blow out your disk cache as well
>as causing swapping, which can contend with the collector. Using no-
>cache mmapped files for scanning, or holding a memory buffer that you
>slide across the files for scanning instead of allocating and
>deallocaing memory, can make this more efficient.
>
>In normal cases we see between 5% and 15% performance penalty for
>garbage collection, and some algorithms actually get a performance
>increase because the collector (unlike free) can run on a separate
>thread and use a second core on a multiprocessor system.
I believe the collector thread is what's killing Xcode text editing performance on my PowerBook G4, though. If your market includes users with 2-3 year old hardware, GC performance might be more of an issue. FWIW.
--
adam
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden