Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFMutableStringRef creation question



Laurence Harris wrote:
Frankly, the whole mutable/immutable thing seems confusing at times. For
example, what's the point of specifying a capacity when creating a mutable
CF object? I've never been able to detect a performance different when
specifying a maximum capacity. Do the immutable variants offer any
advantages over their mutable counterparts?
For the same reasons that you'd specify a starting capacity when creating a hash table, or call reserve on a vector, etc. Everything will behave the same, but fewer trips into the allocator and fewer memcpy's. This might not be a significant win for some types of code, but for others it may be quite important.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: CFMutableStringRef creation question (From: Laurence Harris <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.