This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC and fast eveluaton of polynomials
- From: Andreas Svrcek-Seiler <svrci at tbi dot univie dot ac dot at>
- To: <moshier at moshier dot ne dot mediaone dot net>
- Cc: "Timothy J. Wood" <tjw at omnigroup dot com>, <gcc at gcc dot gnu dot org>
- Date: Tue, 20 Nov 2001 15:32:51 +0100 (CET)
- Subject: Re: GCC and fast eveluaton of polynomials
> That's really too bad! It looks like the second version will defeat
> some optimizations, which would mean that writing it that way
> actually prevents the compiler from making a mess of it. Please
> mention what brand of computer you are using. If you give a complete
> test case in the form of a bug report, maybe someone will investigate.
I'm using
"Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)"
the commandline was
gcc -c -O2 -ffast-math -mpentiumpro -march=pentiumpro -Dflex sff.c
(-O3 or even more brought no gain, using gcc3 brought a minor slowdown)
the machine is a Pentium III (Coppermine) at 733 MHz.
By 'significant' speed difference I only meant it
was above the uncertainties due to system overhead,
so, practically, it does not matter, I was just curious and did not want
to report a bug.
What I WOULD like are faster transcendental functions (like e.g. log()),
which is probably a FPU problem, not a gcc one
(someone told me that there are (RISC-)processors capable of doing a
sqrt() in one cycle although I doubt that ;-)
By the way, manually splitting the polynomial into two halves
(as Timothy Wood suggested) brought no improvement.
bestregards,
greetings from Vienna
andreas
)))))
(((((
( O O )
-------oOOO--(_)--OOOo-----------------------------------------------------
o Wolfgang Andreas Svrcek-Seiler
o (godzilla)
svrci@tbi.univie.ac.at
.oooO Tel.:01-4277-52733
( ) Oooo.
-------\ (----( )--------------------------------------------------------
\_) ) /
(_/