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]

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





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