harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Regis <xu.re...@gmail.com>
Subject Re: [classlib] java.io.DataOutputStream behaviour doesn't match RI
Date Mon, 14 Sep 2009 02:31:34 GMT
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 

Best Regards,

View raw message