pre-compiled, fast code
Posted Feb 10, 2006 13:52 UTC (Fri) by
man_ls (subscriber, #15091)
In reply to:
pre-compiled, fast code by pkolloch
Parent article:
A look at GCJ 4.1
I also did some benchmarks some time ago (may 2004). The results are here (in Spanish, the site is under maintenance right now); I will quote some of them here. Code was inserted in a loop and repeated 10^9 times, except the last loop which had 2*10^5 iterations.
results for null benchmark
java gcj
0.812 1.527
results for add int benchmark
java gcj
2.66 0.082
results for add float benchmark
java gcj
3.703 0.981
results for add double benchmark
java gcj
2.649 0.985
results for method call benchmark
java gcj
2.818 0.081
results for create object benchmark
java gcj
3.081 10.02
results for append string benchmark, 1/5000
java gcj
4.003 9.583
As you can see, arithmetic computations and method calls were much faster in gcj; object creation was slower. It would be interesting to repeat the tests again, with newer versions of both Sun's JVM and GCJ. I will see if I have the code lying around.
(
Log in to post comments)