Speed Impact experiment on GCJ
Andrew Haley
aph@redhat.com
Thu Feb 16 15:17:00 GMT 2006
Rui Wang writes:
> >
> >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.
It is.
> 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?
gcj -v --help
Andrew.
More information about the Java
mailing list