classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] [Patch] Improve/fix gnu.java.net.LineInputStream...


From: Tom Tromey
Subject: Re: [cp-patches] [Patch] Improve/fix gnu.java.net.LineInputStream...
Date: 13 Sep 2005 11:24:05 -0600
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "Chris" == Chris Burdess <address@hidden> writes:

>> I did take the liberty of adding my own micro-optimization, in that
>> if the encoding is US-ASCII, we can skip using String's character
>> encoding system and just request hibyte of 0.  I did this because a
>> year ago with  libgcj-3.4.3 we were seeing a vast increase in speed
>> doing this in a different situation.

Chris> This micro-optimisation should be applied to
Chris> ByteArrayOutputStream.toString, not here.

I agree with this approach.

However, I'm not sure this optimization is correct.  Strictly
speaking, we may see a byte >= 0x80, which is not ASCII.  Will the
ASCII converter turn this into '?'?  (I forget what happens here ... I
know Sun has been a bit lax about ASCII handling in some areas,
treating it as identical to 8859-1.)

Tom




reply via email to

[Prev in Thread] Current Thread [Next in Thread]