public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/31396]  New: Inline code performance much worse than out-of-line
@ 2007-03-29 22:15 jamagallon at ono dot com
  2007-03-29 22:17 ` [Bug c/31396] " jamagallon at ono dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: jamagallon at ono dot com @ 2007-03-29 22:15 UTC (permalink / raw)
  To: gcc-bugs

A simple function that just sums over a vector is much slower if inlined than
out of line. The o-o-l version keeps the sum in a xmm register, the inline
version keeps reading and storing the stack variable on each iteration (guessed
looking at the assembler).

Timings on a 2.4 P4 Xeon:
out-of line:
T0: 3117.44 ms
T1: 653.93 ms
inline:
T0: 3097.05 ms
T1: 3104.18 ms


-- 
           Summary: Inline code performance much worse than out-of-line
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jamagallon at ono dot com
GCC target triplet: i586-mandriva-linux-gnu


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


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

end of thread, other threads:[~2008-01-18  7:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-29 22:15 [Bug c/31396] New: Inline code performance much worse than out-of-line jamagallon at ono dot com
2007-03-29 22:17 ` [Bug c/31396] " jamagallon at ono dot com
2007-03-29 22:18 ` jamagallon at ono dot com
2007-03-29 22:23 ` jamagallon at ono dot com
2007-03-29 22:47 ` [Bug middle-end/31396] " jamagallon at ono dot com
2007-04-03  4:49 ` [Bug rtl-optimization/31396] " pinskia at gcc dot gnu dot org
2007-04-03  5:03 ` pinskia at gcc dot gnu dot org
2007-04-04  7:05 ` ubizjak at gmail dot com
2007-04-04  8:21 ` ubizjak at gmail dot com
2008-01-12 19:14 ` hubicka at gcc dot gnu dot org
2008-01-16 17:20 ` hubicka at gcc dot gnu dot org
2008-01-16 17:26 ` hubicka at gcc dot gnu dot org
2008-01-18  8:59 ` 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).