This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the GCJ project. See the GCJ home page for more information.


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

Re: Newbie Qs



KGB Software writes:
> Does anyone have any feel for how big a speed hit (relative
> to C, say) a GCJ-compiled Java program takes?  How does GCJ's
> performance compare with other native Java compilers (eg.,
> TowerJ)?

We demoed the gcj compiler at the last Linux World. We were running
the Linpack benchmark. Here are the results, on a PII266/Linux box
(the Mflops are reported by the benchmark itself):

	jdk1.1.7:					  1.8 Mflops
	gcj, non optimized:				  9 Mflops
	gcj (-O3 -fomit-frame-pointer):			  50 Mflops
	gcj (-O3 -fomit-frame-pointer -fno-bounds-check): 137 Mflops

You can find the source code of the benchmark here: 
http://www.netlib.org/benchmark/linpackjava/

But be cautious with the results, this is just a benchmark.

> I've read one paper on Java performance in scientific apps
> (http://wwwipd.ira.uka.de/~phlipp/javaCS.ps.gz) that notes that
> IBM's "high performance java" compiler has a flag to disable
> array bounds checking, which results in large improvements in
> scientific apps' performance.  Does/will GCJ also allow
> array bounds checking to be turned off?

Yes. It's `-fno-bounds-check'

> And when will GCJ be available to mere mortals?

gcj is already part of egcs. If you download egcs and compile is, you
have gcj.

.--- Alex (www.cygnus.com/~apbianco, apbianco@cygnus.com)
| Alexandre Petit-Bianco, Cygnus Solutions Java Team.