Tim Ellison wrote:
On 13/Sep/2009 14:28, Mark Hindess wrote:
Beats me. Reading the code, it is a shame we have to traverse the
string twice, once to count the bytes required for UTF-8, and again to
perform the encoding. I bet it would be worth speculatively optimizing
for ascii (if this ever showed up on a performance benchmark).
Regards,
Tim
Agree. There are some other places, for example, UTF_8.java, can be optimized by
the same way. It can be simply done by change "averageBytesPerChar" from 1.1f to
1.0f.
--
Best Regards,
Regis.