This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: speed of double-precision divide
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Steve White <swhite at aip dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 23 Jan 2010 08:51:57 -0800
- Subject: Re: speed of double-precision divide
- References: <20100123164702.GB21700@cashmere.aip.de>
On Sat, Jan 23, 2010 at 8:47 AM, Steve White <swhite@aip.de> wrote:
> gcc has this (gcc -std=c99 -O3 -msse2 -mfpmath=sse -lm -S dt.c)
> icc has this (icc -Wall -w2 -fast -c dt.c)
icc's -fast is equivalent to gcc's -ffast-math option which you did
not supply so you comparing apples to oranges.
Note supplying -ffast-math will have gcc to pull out the division out
of the loop which should speed up your program with some loss of
precision.
Thanks,
Andrew Pinski