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


Miguel writes:
 > 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?

Generate assember with gcc -S.  But that won't tell you about library
calls, which is where muich of the time goes.

 > 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).

Shouldn't be, unless you're doing a lot of object creation.

Andrew.


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