• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [NSString UTF8String] performance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: ABPerson is a Person or a Company
  • Next by Date: Slow Cocoa
  • Previous by thread: Re: [NSString UTF8String] performance
  • Next by thread: calling method via IMP that returns non id type - compiler warning
  • Index(es):
    • Date
    • Thread