This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: std::max/min optimization
On Wed, Nov 26, 2003 at 08:28:58PM +0100, Gabriel Dos Reis wrote:
> | > The fastest code for the fastest machine is generated with by gcc using
> | > the plain old a > b ? a : b code.
> |
> | That's true only if they compile, themselves, with "-march" options.
>
> if they care about speed, then they're rather using those options.
False. If they care about speed, _and_ are in a position to
recompile everything, then they're using those options. Most users
are not equipped to do that, however much they care, generally for
institutional rather than technical reasons. Typically the money
is better spent upgrading machines.
But the code that goes into the library controls millions of machines,
so minor improvements are worthwhile, even if they only affect users
running code built with default compiler modes.
Nathan Myers
ncm-nospam@cantrip.org