From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24371 invoked by alias); 4 Nov 2006 22:17:05 -0000 Received: (qmail 24166 invoked by uid 48); 4 Nov 2006 22:16:56 -0000 Date: Sat, 04 Nov 2006 22:17:00 -0000 Message-ID: <20061104221656.24165.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/29549] matmul slow for complex matrices In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jb at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-11/txt/msg00305.txt.bz2 List-Id: ------- Comment #4 from jb at gcc dot gnu dot org 2006-11-04 22:16 ------- For the C version with 1d arrays, the benchmark results, with gfortran results for comparison, are Complex version: -O3 funroll-loops -mfpmath=sse -msse2 1.32 above + fast-math 0.38 gfortran -O2: 0.32 Real version: 0.07 s fast-math, same thing. gfortran -O2 -g 0.07 So it seems the culprit is some optimization that -ffast-math enables that makes a huge difference for C99 complex arithmetic. However, compiling matmul in libgfortran with -ffast-math almost certainly won't fly.. So ideally we should find exactly what flag enables this performance improvement, and see if we can enable only that without bringing in all the -ffast-math baggage. Or then we should bugger the optimizer guys, if this is an optimization that could be enabled also without -ffast-math. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29549