It is currently Tue Dec 12, 2017 7:28 am

Mulle kybernetiK Optimization

Forum for Optimizations around Cocoa and Mac OS X

NSString - Searching for a character in a string

Optimizations concerning <i>Foundation</i> or <i>Objective-C</i> and its runtime
User avatar
 
Posts: 42
Joined: Fri Aug 06, 2004 9:20 am
Location: Bochum
Website: http://www.mulle-kybernetik.com/weblog

NSString - Searching for a character in a string

Post by Nat! » Thu Nov 18, 2004 2:27 pm

I was under the misimpression, that

<b><tt>- (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)aSet options:(unsigned int)mask</tt></b>

is faster than

<b><tt>- (NSRange)rangeOfString:(NSString *)aString options:(unsigned)mask</tt></b>.

It is not so. At least not on Panther with my G5. In fact <tt>rangeOfString</tt> is faster.

Return to “Foundation & Objective-C”

Who is online

Users browsing this forum: No registered users and 1 guest