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]

Re: c vs. java vs. gcj performance


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




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