public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/34682]  New: 70% slowdown with SSE enabled
@ 2008-01-05 23:06 rootkit85 at yahoo dot it
  2008-01-05 23:08 ` [Bug c/34682] " rootkit85 at yahoo dot it
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: rootkit85 at yahoo dot it @ 2008-01-05 23:06 UTC (permalink / raw)
  To: gcc-bugs

I have a piece of code that runs 70% slower with SSE enabled than with plain
387 on a Dual CPU Xeon system.
I'm not an optimization fanatic, but since -mfpmath=sse is enabled by default
on amd64 this could cause huge performance losses while making amd64 binaries
on this CPU

The runlog is:

[aguy@enc1 ~]$ uname -a
FreeBSD enc1 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC 2007  
  root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP  
[aguy@enc1 ~]$ gcc42 -v
Using built-in specs.
Target: i386-portbld-freebsd6.2
Configured with: ./..//gcc-4.2-20071024/configure --disable-nls
--with-system-zlib --with-libiconv-prefix=/usr/local --with-gmp=/usr/local
--program-suffix=42 --libdir=/usr/local/lib/gcc-4.2.3
--with-gxx-include-dir=/usr/local/lib/gcc-4.2.3/include/c++/ --disable-rpath
--prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/gcc42
i386-portbld-freebsd6.2
Thread model: posix
gcc version 4.2.3 20071024 (prerelease)
[aguy@enc1 ~]$ gcc42 ssucks.c -O2 -march=prescott -o ssucks-387
[aguy@enc1 ~]$ gcc42 ssucks.c -O2 -march=prescott -o ssucks-sse -mfpmath=sse
[aguy@enc1 ~]$ ssucks-387 ; ssucks-sse

   FLOPS C Program (Double Precision), V2.0 18 Dec 1992

   Module     Error        RunTime      MFLOPS
                            (usec)
     1      4.0146e-13      0.0147    953.0052
     2     -1.4166e-13      0.0061   1149.6845

   FLOPS C Program (Double Precision), V2.0 18 Dec 1992

   Module     Error        RunTime      MFLOPS
                            (usec)
     1      4.0146e-13      0.0146    960.7945
     2     -1.4166e-13      0.0281    249.3171
[aguy@enc1 ~]$

1149.6845 vs 249.3171: a ~78% slowdown by just enabling sse

I have source, assembled files and runlog online here:
http://teknoraver.campuslife.it/software/gcc-sse/

Cheers,
Matteo Croce


-- 
           Summary: 70% slowdown with SSE enabled
           Product: gcc
           Version: 4.2.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rootkit85 at yahoo dot it


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34682


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-01-07 20:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-05 23:06 [Bug c/34682] New: 70% slowdown with SSE enabled rootkit85 at yahoo dot it
2008-01-05 23:08 ` [Bug c/34682] " rootkit85 at yahoo dot it
2008-01-05 23:11 ` rootkit85 at yahoo dot it
2008-01-05 23:14 ` rootkit85 at yahoo dot it
2008-01-06 12:53 ` [Bug target/34682] " rguenth at gcc dot gnu dot org
2008-01-07 13:12 ` ubizjak at gmail dot com
2008-01-07 14:34 ` ubizjak at gmail dot com
2008-01-07 14:58 ` ubizjak at gmail dot com
2008-01-07 20:00 ` rootkit85 at yahoo dot it
2008-01-07 20:00 ` rootkit85 at yahoo dot it
2008-01-07 20:04 ` rootkit85 at yahoo dot it
2008-01-07 20:05 ` rootkit85 at yahoo dot it
2008-01-07 20:48 ` uros at gcc dot gnu dot org
2008-01-07 21:03 ` ubizjak at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).