This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: std::max/min optimization


Nathan Myers <ncm-nospam@cantrip.org> writes:

> 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.

Linux distributions are starting to ship tuned versions of various
packages for particular architectures when that performance tuning
actually makes a difference.  People who care a great deal about issues
like this can use distributions like Gentoo.

I really think that this is the wrong place to solve this sort of problem,
in part because obfuscated code is put into the library for performance
reasons and then never gets touched even ten years down the road where the
baselines for all compilation have changed and everyone would have been
better-served by simpler code.

I'm remembering all the work that had to be done when gcc learned how to
optimize standard C functions itself and the glibc hand-optimizations had
to be untangled because they were actually worse, not to mention more
difficult to maintain and occasionally the cause of different problems
and/or warnings.  I think avoiding more situations like that is to
everyone's benefit, even if it means people have to recompile to get the
most optimally tuned code.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]