How to avoid de-optimization
Tim Prince
tprince@computer.org
Sat Aug 25 18:36:00 GMT 2001
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
>
More information about the Gcc
mailing list