How to avoid de-optimization

Frank Klemm pfk@fuchs.offl.uni-jena.de
Sat Aug 25 13:49:00 GMT 2001


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