This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Performance of Integer Multiplication on PIII (Start-up fileoddities)
- To: Jan Hubicka <jh at suse dot cz>
- Subject: Re: Performance of Integer Multiplication on PIII (Start-up fileoddities)
- From: pete at ltoi dot iap dot physik dot tu-darmstadt dot de
- Date: Tue, 6 Nov 2001 17:43:20 +0200 (MEST)
- Cc: Kevin Atkinson <kevin at atkinson dot dhs dot org>, Tim Prince <tprince at computer dot org>, <gcc at gcc dot gnu dot org>
Hi!
In order to cut down the degrees of variance the method of comparing
timing results with different compiler versions {glibc's, &c.}
inherentely introduces, i chose the best performing compiler (out of
mine) with the best flag settings (so far & for the Athlon) & let him
produce asm files for each part of Kevins (or more exactely my
slightly biased version of the) testcase.
Compiler: hgcc = gcc-2.95.2 with haifa scheduler
Flags : -march=i686 -O2 -fomit-frame-pointer -malign-loops=2
-malign-jumps=2 -mpreferred-stack-boundary=2
resulting in the asm files imul.s (main program), read_empty.s and
read2.hgcc.s (read2.c was this modification of Kevins read.c, which
employes the Horner schemata).
{In order to keep this mail short: asm listings are available upon
request}
Now, if you link this with the different installed gcc version, you
will find "all kind" of answers:
gcc -s -o imul imul.s read_empty.s read2.hgcc
Loop: 0.78, Code: 2.36
Clocks: 17.58
/opt/gcc295-haifa/bin/gcc -s -o imul imul.s read_empty.s read2.hgcc.s
Loop: 2.35, Code: 1.13
Clocks: 8.42
/opt/gcc295.2/bin/gcc -s -o imul imul.s read_empty.s read2.hgcc.s
Loop: 2.35, Code: 1.12
Clocks: 8.34
/opt/gcc295.2-haifa/bin/gcc -s -o imul imul.s read_empty.s read2.hgcc.s
Loop: 2.35, Code: 0.78
Clocks: 5.81
/opt/gcc295.3-haifa/bin/gcc -s -o imul imul.s read_empty.s read2.hgcc.s
Loop: 2.35, Code: 1.13
Clocks: 8.42
/opt/gcc3.0-haifa/bin/gcc -s -o imul imul.s read_empty.s read2.hgcc.s
Loop: 2.35, Code: 1.13
Clocks: 8.42
/opt/gcc3.0.2/bin/gcc -s -o imul imul.s read_empty.s read2.hgcc.s
Loop: 2.35, Code: 0.79
Clocks: 5.89
/opt/pgcc295.3-haifa/bin/gcc -s -o imul imul.s read_empty.s read2.hgcc.s
Loop: 0.78, Code: 2.36
Clocks: 17.58
where gcc here is the host compile from the distro (SuSE-6.2 egcs):
gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
...
Does this mean, that the different gcc start-up codes, render this type
of investigations rather useless? Now again: What was the quintessence
of the flops debate?
Hope, this E-mail has more clarity, than my previous vast amounts of
{unwanted} timings.
Regards,
Peter
PS.: In my vast amounts timings, one thing seems to peel out:
Horner version is faster then "brace-free" version
Did gcc exploids this freedom, or did he calc from left to right?
And gcc-2.95 performs better than gcc-3.0.x . But, that my be
totally biased by the different start-up codes .?.