This is the mail archive of the java@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: gcj's IO performance vs blackdown JDK


On Dec 27, 2003, at 6:59 AM, Mohan Embar wrote:

...Solution: fix InputSreamReader to decode characters directly into the
array given to it in the read() method. This brought us up to about or slightly
faster than the JRE 1.4.2 on Chris's test.

I was too eager to try this out to wait 'til next week :)


Here are my timings for successive iterations of this. And attached is
my informal patch for the (direct read into buffer + StringBuffer member
variable + String.valueOf() + lineEnd() native) fix.


Hi Mohan,

Here's my BufferedReader and InputStreamReader improvements. Perhaps you would like to bake these versions off against your modifications. In the case of BufferedReader the new code is a lot simpler as well as potentially more efficient, since it gets rid of all the special-case checks for "\r" at the end of each line.

Regards

Bryce.

Attachment: BufferedReader.java
Description: Text document

Attachment: InputStreamReader.java
Description: Text document



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