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]

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]