From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23720 invoked by alias); 27 Apr 2007 11:41:42 -0000 Received: (qmail 23694 invoked by uid 48); 27 Apr 2007 11:41:33 -0000 Date: Fri, 27 Apr 2007 11:41:00 -0000 Message-ID: <20070427114133.23693.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/31723] Use reciprocal and reciprocal square root with -ffast-math In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-04/txt/msg02101.txt.bz2 ------- Comment #7 from burnus at gcc dot gnu dot org 2007-04-27 12:41 ------- > (float) time for 1.0 / sqrt = 5.96 sec (res = 2.8450581250000000e+05) > (float) time for rsqrt = 2.49 sec (res = 2.2360225000000000e+05) > (double) time for 1.0 / sqrt = 7.35 sec (res = 5.9926234364635509e+05) > (double) time for rsqrt = 7.49 sec (res = 5.9926234364355623e+05) On an Athlon 64 2x, the double result is more favourable for rsqrt (using the system g++ 4.1.2 with g++ -march=opteron -O3 -ftree-vectorize -funroll-loops -funit-at-a-time -msse3 frsqrt.cc; similarly with -ffast-math) (float) time for 1.0 / sqrt = 3.76 sec (res = 1.7943843750000000e+05) (float) time for rsqrt = 1.72 sec (res = 1.7943843750000000e+05) (double) time for 1.0 / sqrt = 5.15 sec (res = 5.9926234364320245e+05) (double) time for rsqrt = 3.34 sec (res = 5.9926234364320245e+05) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31723