A
Alf P. Steinbach
* Pete Becker:
Heh, I'm still following this thread... ;-)
And you're misrepresenting the earlier exchange.
You wrote, originally,
"Unicode would be a poor choice if, for example, your characters are
encoded in ASCII and you care about speed".
And you explained this by
"because of the size of the character set and the resulting complexity
of the data representation for character attributes"
Perhaps that's not what you /meant/ to write, but that's what you wrote,
and that, including the explanation that followed in the same para, was
what I asked for an example of,
"could you give an example where case conversion of an arbitrary ASCII
text is necessarily faster than the same case conversion of the same
text in fixed a size per character Unicode representation (e.g. USC2
limited to BMP, or USC4)?"
(transposition typos not intentional and not corrected here).
I can think of a case where uppercasing or lowercasing Unicode will
likely be slower than ASCII for the same text, namely for a really large
text that must be in-memory, where one encounters more paging. But that
has nothing to do with the size of the character set, nor the resulting
complexity of the data representation for character attributes. In
other cases Unicode might generally be faster than ASCII.
* Squeamizh:
Look, it's simple: I said that case conversions under Unicode can be
rather slow compared to straight ASCII, and Alf challenged me to prove
that they're always slower. I declined to try to prove something that I
didn't say.
Heh, I'm still following this thread... ;-)
And you're misrepresenting the earlier exchange.
You wrote, originally,
"Unicode would be a poor choice if, for example, your characters are
encoded in ASCII and you care about speed".
And you explained this by
"because of the size of the character set and the resulting complexity
of the data representation for character attributes"
Perhaps that's not what you /meant/ to write, but that's what you wrote,
and that, including the explanation that followed in the same para, was
what I asked for an example of,
"could you give an example where case conversion of an arbitrary ASCII
text is necessarily faster than the same case conversion of the same
text in fixed a size per character Unicode representation (e.g. USC2
limited to BMP, or USC4)?"
(transposition typos not intentional and not corrected here).
I can think of a case where uppercasing or lowercasing Unicode will
likely be slower than ASCII for the same text, namely for a really large
text that must be in-memory, where one encounters more paging. But that
has nothing to do with the size of the character set, nor the resulting
complexity of the data representation for character attributes. In
other cases Unicode might generally be faster than ASCII.