- To: xunxun <xunxun1982@xxxxxxxxx>
- Subject: Re: GCC's -ffast-math behavior
- From: Andrew Haley <aph@xxxxxxxxxx>
- Date: Thu, 09 Feb 2012 10:29:35 +0000
- Cc: gcc-help@xxxxxxxxxxx
- Comment: DKIM? See http://www.dkim.org
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1329388218; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=h+b/v5zKSaeqv7o8DCny Be0+8p0=; b=jZ/v0ZtZR4M81gbmfOhp/blJwfixTWtJbplmpXrat9UEkAoWNdfC sZpluR+/ouok0MnnfbOjKDnV3inUpDL4ncvdhKXnCUwKSi1cY/WrOjQWSARxgdiD VZSuvttF/i7UGEVb05OPBVQvQedMMXtvDVyT987z0qDA4EgxK4+KcRo=
- In-reply-to: <4F339E09.9000300@gmail.com>
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16
On 02/09/2012 10:20 AM, xunxun wrote:
> I use the code main.c (test sin speed)
>
> On Win7 64bit, gcc 4.6.2 32bit
>
> gcc -O3 -ffast-math main.c -o main.exe
>
> run main.exe will cost 6.853s.
>
> When linking with intel libM no fastmath
>
> gcc -O3 main.c -o main.exe libmmt.lib libircmt.lib
>
> run main.exe will cost 4.367s.
Ah okay, I get it now, its sin, not exp. I suspect that it's the
argument reduction step that's slowing you down.
Andrew.
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]