Re: Reading in dictionary from txt file: options for speed
Re: Reading in dictionary from txt file: options for speed
- Subject: Re: Reading in dictionary from txt file: options for speed
- From: Kyle Sluder <email@hidden>
- Date: Thu, 16 Apr 2009 20:31:07 -0400
On Thu, Apr 16, 2009 at 8:09 PM, Miles <email@hidden> wrote:
> char *ptr = strstr(fileBytes, cString);
OK, this makes sense, but you're still doing a linear scan through the
data you've loaded (and I'm assuming creating NSString objects from
what you find because plain old C strings will be pretty useless to
you otherwise). You might very well find that storing the plist
representation winds up being faster or saving you from some code in
the future. Particularly if you are doing lookups in the dictionary
based on user input, because Unicode is tricky with what is considered
"equal".
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden