This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


>>>>> "Chris" == Chris Burdess <dog@bluezoo.org> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]