From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14007 invoked by alias); 5 Feb 2003 14:20:00 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 13999 invoked from network); 5 Feb 2003 14:19:59 -0000 Received: from unknown (HELO smtp-relay-2.adobe.com) (192.150.11.2) by 172.16.49.205 with SMTP; 5 Feb 2003 14:19:59 -0000 Received: from inner-relay-2.corp.adobe.com (inner-relay-2 [153.32.1.52]) by smtp-relay-2.adobe.com (8.12.3/8.12.3) with ESMTP id h15EJtAC023461 for ; Wed, 5 Feb 2003 06:19:56 -0800 (PST) Received: from iplan-mn.corp.adobe.com (iplan-mn.corp.adobe.com [130.248.25.5]) by inner-relay-2.corp.adobe.com (8.12.3/8.12.3) with ESMTP id h15EJo4W029551 for ; Wed, 5 Feb 2003 06:19:50 -0800 (PST) Received: from [130.248.25.220] ([153.32.12.150]) by iplan-mn.corp.adobe.com (Netscape Messaging Server 4.15 mn Jul 11 2001 16:32:57) with ESMTP id H9UAH200.JIW; Wed, 5 Feb 2003 08:19:50 -0600 User-Agent: Microsoft-Entourage/10.0.0.1331 Date: Wed, 05 Feb 2003 14:20:00 -0000 Subject: Re: Optimise a build for floating point operation From: John Love-Jensen To: =?ISO-8859-1?B?2A==?=ystein O Johansen CC: Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable X-SW-Source: 2003-02/txt/msg00053.txt.bz2 Hi =D8ystein, >Should I add -mfpa ? (What does it do?) -mfpa enables the Sun FPA instructions for floating point. q.v. . >what about -mnumeric? For the Intel 960, that indicates that floating point is supported in hardware. The inverse, -msoft-float, indicates that floating-point should not be assumed (thus, adds overhead for Intel 960 systems that have floating point support). >Will that help the performance? Only if you are running on Intel 960 CPU. >What about -mfpmath, -mmmx and -msse? What's that? These are for Intel 80x86 CPUs. The -mmmx enables the MMX instructions on the appropriate MMX capable Intel CPUs. MMX has nothing to do with floating point, and since the MMX instructions puts the CPU in a different state from FP (MMX mode, or FP mode), it can impede performance of a heavily floating-point based application. Darn modal CPU. The -mfpmath=3Dsse is probably what you want (I'm not sure if that entails -msse, or requires -msse). I'd avoid MMX. You may want to use -msse2. See the above mentioned online documentation. If IEEE 754 compliance doesn't matter to you, you could get a little more performance out of -mno-ieee-fp. You'll probably want -align-double, which makes your program's memory footprint larger, but floating point can be a little faster. I assume you are using doubles. (Or are you using long double?) There are other optimizations for Athlon and 3Dnow instructions, if that's the hardware you run on. --Eljay