If it's only a few hundred then I wouldn't worry about it that much.
Partly it depends on whether you are doing a localized (human-order)
compare or not. Are you specifying the localized compare option?
If it's a very large database, the fastest option is to keep the data
as raw UTF-16, and get collation keys using UCGetCollationKey and
UCCompareCollationKeys. See:
However, it would have to be a pretty large sort to make it worth
extracting the UTF-16 if the data is not already in that form.
Deborah Goldsmith
Internationalization, Unicode liaison
Apple Computer, Inc.
email@hidden
On Jul 29, 2005, at 9:17 AM, Matt Gough wrote:
Suppose I have a bunch (many hundreds) of CFStringRefs that could
have come from anywhere and which are cached and I need to sort
them (possibly multiple times) as quickly as possible using
CFStringCompare. Is there anything I could do to my cached versions
so that the guts of CFStringCompare runs as fast as possible.
I am thinking maybe ensuring that my cached versions have real
unicode storage and are not left as 8-bit ascii for some strings etc.
Is this worthwhile and if so what is the correct way of getting my
strings in such a state.
Matt Gough
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden