c vs. java vs. gcj performance

Miguel mth@mth.com
Thu May 22 10:53:00 GMT 2003


I see that I can compile with -S

Sorry, I suppose I should have Read The Fine Manual first.

Miguel

> 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


--------------------------------------------------
Miguel Howard                   miguel@howards.org
c/Peña Primera 11-13 esc dcha 6B
37002 Salamanca
España Spain
--------------------------------------------------
telefono casa 923 27 10 82 movil 650 52 54 58
--------------------------------------------------
To call from the US dial    9:00 am Pacific US   =
home 011 34 923 27 10 82   12:00 noon Eastern US =
cell 011 34 650 52 54 58    6:00 pm Spain
--------------------------------------------------




More information about the Java mailing list