This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to avoid de-optimization


My Pentium II was made well before 1998.  My Pentium 4 was made more recently.  It prefers any means to avoid imul in situations
where there are sequential dependencies. Future models in the series may have faster shifts, but not fast imul.

----- Original Message -----
From: "Frank Klemm" <pfk@fuchs.offl.uni-jena.de>
To: <gcc@gcc.gnu.org>
Sent: Saturday, August 25, 2001 12:02 PM
Subject: How to avoid de-optimization


> How to avoid the silly MUL => ADD+SHIFT conversation?
>
> This nearly always increases code size (so it should be disabled with -Os)
> and also decreases speed for CPU build since 1998. It only increases speed
> on CPUs like 386 and 486. On K6, Pentium II, Pentium III, Athlon, Duron
> a SIMPLE 'imul' is much faster and shorter (2 CPU clocks instead of 1...15
> clocks).
>
> gcc contains a lot of optimzations which are actually de-optimizations.
>
> --
> Frank Klemm
>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]