Skip navigation.
 
mlRe: NSString and string contains
FROM : Jens Alfke
DATE : Mon Mar 03 07:50:15 2008

On 2 Mar '08, at 1:44 PM, Andrew Merenbach wrote:

> You probably want to use enumerators and something like the 
> following code:


That's debatable. Personally, I hate using NSEnumerator because it's 
slow. (Not only does it create an autoreleased enumerator object, but 
most of the standard collection enumerators copy the collections they 
enumerate over.)

On the other hand, using fast enumeration via the "for...in..." syntax 
in ObjC-2 is a total win. Not only is the syntax clear, but the 
implementation is very efficient (faster than -objectAtIndex, much 
faster than NSEnumerator.)

—Jens

Related mailsAuthorDate
mlNSString and string contains Tom Jones Mar 2, 21:31
mlRe: NSString and string contains Seth Willits Mar 2, 22:39
mlRe: NSString and string contains Andrew Merenbach Mar 2, 22:44
mlRe: NSString and string contains j o a r Mar 2, 23:01
mlRe: NSString and string contains Johannes Huning Mar 2, 23:02
mlRe: NSString and string contains Andrew Merenbach Mar 2, 23:16
mlRe: NSString and string contains Chris Hanson Mar 3, 05:45
mlRe: NSString and string contains Jens Alfke Mar 3, 07:50