Re: [NSString UTF8String] performance
Re: [NSString UTF8String] performance
- Subject: Re: [NSString UTF8String] performance
- From: Aram Greenman <email@hidden>
- Date: Sun, 15 Feb 2004 19:07:41 -0800
I'm using the AGRegex kit to match regular expressions and with larger
files it's starting to get very slow. The bottleneck seems to be in
[NSString UTF8String] which it calls often. Each call to UTF8String
seems to be calling both
__CFStringEncodedByteStream and
creates a new NSData
Does this conversion and copy always happen when calling UTF8String? Or
do I have my string in the wrong format? I was hoping that their would
be a way to make UTF8String just return a pointer to some underlying
data structure.
I thought that UTF8String did just return a pointer to an internal data
structure, thanks for correcting that Ali. The next release of AGRegex
is going to use C strings instead of NSStrings internally anyway which
should take care of that problem.
Aram
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.