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: Speed Impact experiment on GCJ


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

I also did the same tests using the HotSpot 1.5.0_06 server JVM on a
Fedora Core release 4. 
But I got opposite result. 

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

-sh-2.05b$ ./jScript.sh 
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
Note: Client.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
finish compile
client started

-sh-2.05b$ ./nScript.sh 
gcj (GCC) 4.2.0 20060204 (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.

finish compile
finish creat object files
client started


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

-sh-2.05b$ cat jresult.d 
200.0   23     
300.0   9       
400.0   0       
500.0   1       
600.0   0      
700.0   1       
1000.0  1       
2000.0  2      
5000.0  4       
10000.0 6       
20000.0 12      
30000.0 13      

>gcj at -O3:
>
>[thhal@localhost gcjtest]$ time ./client task.test servers.d result.d
>
>real    0m1.469s
>user    0m1.265s
>sys     0m0.202s
>
>200.0   184
>300.0   276
>400.0   346
>500.0   442
-sh-2.05b$ cat result.d
200.0   1      
300.0   0      
400.0   0       
500.0   0      
600.0   0       
700.0   0      
1000.0  0      
2000.0  0       
5000.0  1   
10000.0 1      
20000.0 1     
30000.0 3      

There are two possible reasons: 
1. different gcj version ( I am using 4.2.0, and yours is 4.0.0), but I
doubt 
this is the problem. 
2. you didn't put -O3 while compiling the bytecode to object file. If
you try it
With -O3, it will actually make a huge difference. But I don't know why
through, would somebody 
On this maillist mind to answer this question?

Thanks 
Rui  



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