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]

We Win! [Was Re: Speed Impact experiment on GCJ]


Thomas Hallgren writes:
 > Andrew Haley wrote:
 > > I tried gcj against IBM's JIT -- still the fastest JIT AFAIAA.
 > > (Disclaimer: this is an old 32-bit version of IBM's JIT, and a newer
 > > one may be better.)
 > > 
 > 
 > I made some similar tests using the HotSpot 1.5.0_06 server JVM on a Fedora Core release 4. 
 > As you can see, my gcj is slightly older then yours. Don't know how much that matters. 
 > Results below:
 > 
 > Regards,
 > Thomas Hallgren
 > 
 > 
 > [thhal@localhost gcjtest]$ gcj --version
 > gcj (GCC) 4.0.0 20050519 (Red Hat 4.0.0-8)
 > Copyright (C) 2005 Free Software Foundation, Inc.
 > This is free software; see the source for copying conditions.  There is NO
 > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 > 
 > [thhal@localhost gcjtest]$ java -version -server
 > java version "1.5.0_06"
 > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
 > Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)
 > 
 > HotSpot server without JIT:
 > 
 > [thhal@localhost gcjtest]$ time java -server -Djava.compiler=none Client task.test servers.d 
 > result.d
 > 
 > real    0m55.379s
 > user    0m53.726s
 > sys     0m1.379s
 > 
 > 200.0   7897
 > 300.0   11791
 > 400.0   15660
 > 500.0   19588
 > 
 > HotSpot server JIT:
 > 
 > [thhal@localhost gcjtest]$ time java -server Client task.test servers.d result.d
 > 
 > real    0m0.510s
 > user    0m0.073s
 > sys     0m0.393s
 > 
 > 200.0   39
 > 300.0   1
 > 400.0   0
 > 500.0   1
 > 
 > REMARK: Obviously, the JIT discovers that the loop is not really a loop sometime
 > during the first iterations and decides to optimize pretty hard...

With a later version of gcj:

gcj (GCC) 4.2.0 20060209 (experimental)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[aph@zorro ~]$ time ./client task.test servers.d result.d

real    0m0.066s
user    0m0.044s
sys     0m0.020s

200.0   0
300.0   0
400.0   0
500.0   0

:-)

Andrew.


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