c vs. java vs. gcj performance
Miguel
mth@mth.com
Thu May 22 09:55:00 GMT 2003
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
More information about the Java
mailing list