This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
c vs. java vs. gcj performance
- From: "Miguel" <mth at mth dot com>
- To: <java at gcc dot gnu dot org>
- Date: Thu, 22 May 2003 11:41:33 +0200 (CEST)
- Subject: c vs. java vs. gcj performance
Question
--------
I don't yet have much experience with gcc tools.
What tool (& command line) do I use to view compiled object code
generated by gcc and gcj?
Summary
-------
I wrote a small benchmark routine to simulate the core of a 3D graphics
engine with a zbuffer. It is nothing but integer comparisons and array
references.
I wrote it in java and c. The c code (compiled with gcc) is 8 times
faster than the java code (under Sun jvm 1.4.1_02).
I also compiled the java code with gcj. The java code with gcj is approx
10% slower than the Sun hot-spot jvm. If I compile with -fno-bounds-check
then it speeds up a little and performance is on-par with the Sun jvm.
I don't yet have much experience with the gcc tools ... but I'm an
old-timer who is fluent with assembly language.
What tool do I use to dump the machine code so that I can compare the code
generated by gcc/.c with gcj/.java ?
I'll report any findings.
Gracias,
Miguel