This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: gcj Linpack performance


[Tim Prince]
> Did you investigate which compiler flags for gcj gave the best
> performance?  I would have
> thought -Os -march=pentiumpro -ffast-math -funroll-loops a likely first
> guess.

No, I haven't. Is there a automated method to try different
combinations of command line switches?

I tried your suggestion and it results in:
~/>gcj -Os -march=pentiumpro -ffast-math -funroll-loops --main=Linpack
Linpack.java
~/>./a.out 
Mflops/s: 22.768  Time: 1.89 secs  Norm Res: 4.7  Precision:
2.220446049250313E-16
~/>./a.out
Mflops/s: 22.756  Time: 1.89 secs  Norm Res: 4.7  Precision:
2.220446049250313E-16

Then I tried with -funrall-all-loops. That gets:
~/>gcj -Os -march=pentiumpro -ffast-math -funroll-all-loops
--main=Linpack Linpack.java
~/>./a.out
        Mflops/s: 23.71  Time: 1.81 secs  Norm Res: 4.7  Precision:
2.220446049250313E-16
~/>./a.out
Mflops/s: 23.975  Time: 1.79 secs  Norm Res: 4.7  Precision:
2.220446049250313E-16

As you can see, the performance measured is reproducable between
runs. And the performance is not as good as my first suggestion.

> ----- Original Message -----
> From: "Florian Schintke" <schintke@zib.de>
> To: <gcc@gcc.gnu.org>
> Sent: Tuesday, July 10, 2001 3:35 AM
> Subject: gcj Linpack performance
> 
> 
> > Hi all,
> >
> > I just tested the performace of gcj 3.0 with the Linpack
> > benchmark
> > http://www.netlib.org/benchmark/linpackjava/Linpack.java
> > and got the following results:
> >
> > The used system
> > > uname -a
> > Linux host 2.2.18 #1 Fri Jan 19 22:10:35 GMT 2001 i686 unknown
> > > cat /proc/cpuinfo
> > processor       : 0
> > vendor_id       : GenuineIntel
> > cpu family      : 6
> > model           : 8
> > model name      : Pentium III (Coppermine)
> > stepping        : 3
> > cpu MHz         : 797.559
> > cache size      : 256 KB
> > fdiv_bug        : no
> > hlt_bug         : no
> > sep_bug         : no
> > f00f_bug        : no
> > coma_bug        : no
> > fpu             : yes
> > fpu_exception   : yes
> > cpuid level     : 2
> > wp              : yes
> > flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca
> > cmov pat pse36 mmx fxsr xmm
> > bogomips        : 1592.52
> >
> >
> > 256MB main memory
> >
> > ###### gcj
> > > gcc -v
> > Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/specs
> > Configured with: ./configure
> > Thread model: single
> > gcc version 3.0
> > > gcj --version
> > 3.0
> > > gcj -O3 --main=Linpack -funroll-all-loops Linpack.java
> > > ./a.out
> >
> > Mflops/s: 24.833  Time: 1.73 secs  Norm Res: 4.7
> > Precision: 2.220446049250313E-16
> >
> > ###### java 1.1.8
> > > /usr/lib/java/bin/java -version
> > java version "1.1.8"
> > > /usr/lib/java/bin/javac Linpack.java
> > > /usr/lib/java/bin/java Linpack
> >
> > Mflops/s: 4.812  Time: 8.93 secs  Norm Res: 6.34
> > Precision: 2.220446049250313E-16
> >
> > ###### IBM java JDK 1.3.0
> > > /usr/lib/jdk1.3/bin/java -version
> > Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
> > Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cx130-20001025 (JIT
> > enabled: jitc))
> > > /usr/lib/jdk1.3/bin/javac Linpack.java
> > > /usr/lib/jdk1.3/bin/java Linpack
> > Mflops/s: 46.877  Time: 0.92 secs  Norm Res: 6.54
> > Precision: 2.220446049250313E-16
> >
> > ###### Compiled with java 1.1.8, executed with IBM JIT
> > > /usr/lib/java/bin/java -version
> > java version "1.1.8"
> > > /usr/lib/java/bin/javac Linpack.java
> > > /usr/lib/jdk1.3/bin/java -version
> > Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
> > Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cx130-20001025 (JIT
> > enabled: jitc))
> > > /usr/lib/jdk1.3/bin/java Linpack
> > Mflops/s: 44.778  Time: 0.96 secs  Norm Res: 6.54
> > Precision: 2.220446049250313E-16
> >
> >
> > Why is gcj not as fast as IBMs JIT compiler?
> > Maybe this info helps you to look how to improve the performance.
> >
> >
> > Florian Schintke
> > --
> > Florian Schintke <schintke@zib.de>, http://www.zib.de/schintke/
> >
> 
Florian Schintke
-- 
Florian Schintke <schintke@zib.de>, http://www.zib.de/schintke/


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