c vs. java vs. gcj performance
Miguel
mth@mth.com
Thu May 22 11:36:00 GMT 2003
> > 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.
I allocate a few short & int arrays at the beginning of the world, before
I get my start time. No object allocation during execution.
I agree that there shouldn't be that much difference.
My first look at the assembler output looks fine.
I'm still puzzled ... still working on it :)
Miguel
More information about the Java
mailing list