public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug optimization/8126] [3.3/3.4 regression] Floating point computation far slower in 3.2 than in 2.95 Date: Thu, 01 Jan 2004 10:25:00 -0000 [thread overview] Message-ID: <20040101102526.28263.qmail@sources.redhat.com> (raw) In-Reply-To: <20021002075601.8126.o.lauffenburger@topsolid.com> ------- Additional Comments From hubicka at ucw dot cz 2004-01-01 10:25 ------- Subject: Re: [3.3/3.4 regression] Floating point computation far slower in 3.2 than in 2.95 > > ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-01 04:11 ------- > What is weird is that -march=i386 is faster than -march=i686 on a pentium3: > grendel:~/src/gnu/gcctest>gcc -O3 -ffast-math -fomit-frame-pointer pr8126.c -march=i386 > grendel:~/src/gnu/gcctest>time ./a.out > Start? > Stop! > Result = 0.000000, 0.000000, 1.000000 > 2.726u 0.000s 0:02.74 99.2% 0+0k 0+0io 2pf+0w > grendel:~/src/gnu/gcctest>time ./a.out > Start? > Stop! > Result = 0.000000, 0.000000, 1.000000 > 2.710u 0.000s 0:02.74 98.9% 0+0k 0+0io 0pf+0w > grendel:~/src/gnu/gcctest>gcc -O3 -ffast-math -fomit-frame-pointer pr8126.c -march=i686 > grendel:~/src/gnu/gcctest>time ./a.out > Start? > Stop! > Result = 0.000000, 0.000000, 1.000000 > 2.843u 0.007s 0:02.87 98.9% 0+0k 0+0io 2pf+0w > grendel:~/src/gnu/gcctest>gcc -O3 -ffast-math -fomit-frame-pointer pr8126.c -march=i586 > grendel:~/src/gnu/gcctest>time ./a.out > Start? > Stop! > Result = 0.000000, 0.000000, 1.000000 > 2.703u 0.000s 0:02.72 99.2% 0+0k 0+0io 2pf+0w > grendel:~/src/gnu/gcctest>gcc -O3 -ffast-math -fomit-frame-pointer pr8126.c -march= > pentium3 > grendel:~/src/gnu/gcctest>time ./a.out > Start? > Stop! > Result = 0.000000, 0.000000, 1.000000 > 2.843u 0.007s 0:02.87 98.9% 0+0k 0+0io 2pf+0w > > Is it looks like a choosing the wrong instruction for pentium3. (pentium4 is different and > does not matter that mcuh). No, it is the scheduler (you will likely reproduce similar results via -fno-schedule-insns2). Scheduler does not take into account the stack register file and reg-stack does not reorder and works by blindly inserting exchange operations when the code does not match stack nature, thus we get 100% random results performance wise out of the backend. The unscheduled code usually fare slightly better as the structure of original expression trees is still somewhat preserved, but it is still far fom optimal. There is not much to do on this front in short term, unfortunately. I've had limited luck with a patch teaching scheduler that two consetuctive FP operations are cheaper when the other uses same operand as destination of the first, but it does not fit very well to current scheduler model (and it is missdesign). Proper sollution is to reorganize scheduler core into kind of library and make reg-stack to use it to fix ordering as needed. I am not planning to dig into it anytime soon tought, home that the importance of x87 will fade. Honza > > -- > What |Removed |Added > ---------------------------------------------------------------------------- > Last reconfirmed|0000-00-00 00:00:00 |2004-01-01 04:11:34 > date| | > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8126 > > ------- You are receiving this mail because: ------- > You are the assignee for the bug, or are watching the assignee. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8126
next prev parent reply other threads:[~2004-01-01 10:25 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20021002075601.8126.o.lauffenburger@topsolid.com> 2003-06-11 22:41 ` pinskia@physics.uc.edu 2003-06-21 1:44 ` dhazeghi at yahoo dot com 2003-06-24 13:23 ` o dot lauffenburger at topsolid dot com 2003-06-24 14:38 ` pinskia at physics dot uc dot edu 2003-07-23 7:02 ` mmitchel at gcc dot gnu dot org 2003-10-16 2:38 ` mmitchel at gcc dot gnu dot org 2003-10-30 6:26 ` uros at kss-loka dot si 2004-01-01 4:11 ` pinskia at gcc dot gnu dot org 2004-01-01 10:25 ` hubicka at ucw dot cz [this message] 2004-01-03 18:39 ` hubicka at gcc dot gnu dot org 2004-01-23 16:58 ` [Bug optimization/8126] [3.3/3.4/3.5 " dhazeghi at yahoo dot com 2004-09-30 16:28 ` [Bug rtl-optimization/8126] [3.3/3.4/4.0 " pinskia at gcc dot gnu dot org 2004-11-26 9:38 ` uros at gcc dot gnu dot org 2005-01-05 21:53 ` hubicka at gcc dot gnu dot org 2005-01-16 3:35 ` ian at airs dot com 2005-01-16 13:52 ` steven at gcc dot gnu dot org 2005-01-27 9:08 ` uros at kss-loka dot si
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040101102526.28263.qmail@sources.redhat.com \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).