Not too fast on amd64
Posted Feb 12, 2006 2:54 UTC (Sun) by
man_ls (subscriber, #15091)
In reply to:
pre-compiled, fast code by man_ls
Parent article:
A look at GCJ 4.1
I did not keep the code around, so I rewrote it -- now with a much simpler structure -- and run it on my amd64 (some call it x86-64) running OpenSUSE 10.0. The machine had sporadic loads; but the results are quite similar over several rounds, and quite definite too.
I will post the code for review if anyone is interested. Sun's JDK 1.5 revision 6 for amd64, and gcj 4.0.2 20050901 with optimization -O2 were used. The results are:
results for null benchmark
java gcj
0.007 1.638
results for add int benchmark
java gcj
1.298 1.118
results for add long benchmark
java gcj
0.751 1.810
results for add float benchmark
java gcj
3.054 2.399
results for add double benchmark
java gcj
3.103 2.223
results for method call benchmark
java gcj
0.069 4.398
results for create object benchmark
java gcj
27.28 148.356
results for append string benchmark, 1/5000
java gcj
0.069 0.183
As you can see Sun has improved some things, notably method calls; while object creation has horrible performance in both Sun's java and GCJ. (The null benchmark was an artifact of the previous test setup, so you can ignore it; probably string concatenation too.) GCJ keeps a slight edge in some arithmetic operations.
I'm looking forward to try out GCJ 4.1.
(
Log in to post comments)