Rethinking optimization for size
Posted Feb 1, 2013 10:51 UTC (Fri) by epa (subscriber, #39769)
The compiler has no chance to know on which CPU the code will run in the end.
The developer building Fedora, etc, also doesn't know on which CPU it will be run, but you can make a reasonable guess and try to use optimizations that perform well on typical target hardware. That won't be the same set of optimizations that worked on a typical i486, even if you exclude things that require new instruction set support. Yet the set of optimizations chosen by -O and -O2 is essentially fixed and gcc doesn't use its knowledge of the target CPU to influence that set.
Posted Feb 7, 2013 14:50 UTC (Thu) by engla (guest, #47454)
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds