This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to avoid de-optimization
- To: "Frank Klemm" <pfk at fuchs dot offl dot uni-jena dot de>, <gcc at gcc dot gnu dot org>
- Subject: Re: How to avoid de-optimization
- From: "Tim Prince" <tprince at computer dot org>
- Date: Sat, 25 Aug 2001 18:36:12 -0700
- References: <20010825210235.A14105@fuchs.offl.uni-jena.de>
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
>