Philippe Elbaz-Vincent on Fri, 20 Nov 1998 15:22:13 +0100

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PARI] benchmarks results for ix86+comments

Here are some  bench results (best of several runs...with a light
load..) for 2.0.12.alpha+patches, and some comments who could be useful
to Pari dev/users (in fact to those who compile Pari or other number
theory, or science, programs. The others can skip this message..). It's
more or less a "naive report" that I promessed to Gerhard Niklasch more
than 2 months ago (:-((( 

Intel P2  350Mhz/100Mhz  Linux 2.0.36 egcs-2.92.21 X11  3352 (gp-sta)
3402 (gp-dyn)
Intel P2  350Mhz/100Mhz  Linux 2.0.36 pgcc-2.92.21 X11  3310 (gp-sta)
3340 (gp-dyn)
""           ""                """    gcc-   "   3600 (gp-sta)
3610 (gp-dyn)

egcs=experimental gnu c
pgcc=pentium gcc (relevant only for ix86 family, including cyrix, amd,

relevant datas: 
CFLAGS (for egcs)= -O9 -malign-double -fschedule-insns2  -mpentium
-march=pentium \ -fomit-frame-pointer -fno-strength-reduce
-fno-inline-functions \ -fexpensive-optimizations
CFALGS (for pgcc)= -O9 -malign-double -mk6   -fomit-frame-pointer\
-fno-strength-reduce -fno-inline-functions

Libc: 5.4.46
Binutils: or
(egcs/pgcc compiled with Haifa scheduler)

comments: the result is around 5%-10% better than with gcc- with 
CFLAGS (for gcc)= -O3  -malign-loops=2 -malign-functions=2
-malign-jumps=2  \
-fomit-frame-pointer -fno-strength-reduce -fexpensive-optimizations,
which give the best results on P2 as far as I've tested.
In practice, gp/pgcc is 10% faster than gcc, and always faster than

the -O9 is for convenience, this doesn't activate special features for
egcs, but activate special features for pgcc up to -O6.

the flags -mpentiumpro -march=pentiumpro (which is native) slow down a
little bit the performance for egcs and quite a lot for pgcc, but with
other applications this flags give better results.

For pgcc the flag -mk6 (-mamdk6 for the previous releases < 2.92.xx)
gives often nice performance on p2, but in several cases the flag
-mpentium -march=pentium could be relevant and could give the best
performance (if, of course,  you haven't seg. fault (!) which is
unfortunately for instance the case with gp-2.0.12, but, I think, gp is
not guilty this time)

the scheduling is turning on by pgcc with -O4 and higher.

It is important to notice that, for egcs there were improvement for ix86
architecture (in particular ppro) recently, and you wouldn't get similar
results with previous releases or snapshots.

the flag -fno-inline-functions is often relevant for ix86 architecture
(this include k6).

NB: 1) egcs has also optimizations for ultrasparc (v9), but the alpha
support needs, according to the egcs list, improvement...but stay
2) the compilation of some programs (the Linux kernel for instance) 
could be problematic and you will need sometime special patches (when
3) gcc- is faster on p2 than gcc-2.7.2.x with x>1 and gcc-2.8.y,
4) It is known that glibc2 is better than the old one (like
libc-5.4.46), but I haven't results for this library yet, furthermore
you  should take into account that the old libc will not be supported
5) if you recompile all your libraries with egcs or pgcc and the
appropriate falgs, you should get better results.

Hope this could be useful,

   Have fun !!

Ph. Elbaz-Vincent, Marie Curie Fellow,
DFG-Forschergruppe "Arithmetic and Geometry", FB 6, Mathematik,
Universitaet GH Essen, D-45117 Essen | 
Phone: +49 201 183 2198 | Fax: +49 201 183 2426