This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj's IO performance vs blackdown JDK
- From: Bryce McKinlay <bryce at mckinlay dot net dot nz>
- To: Christopher Marshall <christopherlmarshall at yahoo dot com>
- Cc: java at gcc dot gnu dot org
- Date: Tue, 2 Dec 2003 15:24:19 +1300
- Subject: Re: gcj's IO performance vs blackdown JDK
- References: <20031201160754.5961.qmail@web41509.mail.yahoo.com>
On Dec 2, 2003, at 5:07 AM, Christopher Marshall wrote:
I have written a lot of programs that process huge text files a line
at a time at my work that are 2 to three times slower running under
gcj than running under
the JDK and I am pretty sure this I/O issue is the cause.
run_benchmark uses Hashgen.java to generate a 100000 line text file
with 1000
character lines. On my machine (433 Mhz celeron dell laptop running
slackware
linux 9.0), it takes the JDK 11.1 seconds to run line_count against
the file
and it takes the gcj compiled version 34.6 seconds.
Thanks Christopher, this is a useful test case. I suspect the problem
here is our horribly inefficient implementation of
BufferedReader.readLine(). Given that it is calling a synchronized
read() method in a loop for every character in the stream, I'm
surprised its only 3x slower! You might like to have a go at making a
more efficient implementation, or alternatively, file an "RFE" bug in
bugzilla.
Cheers
Bryce.