|
Boost : |
Subject: Re: [boost] [Review:Algorithms] Order of args to clamp
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-09-25 13:45:05
on Sun Sep 25 2011, "Phil Endecott" <spam_from_boost_dev-AT-chezphil.org> wrote:
> Dave Abrahams wrote:
>> No, no, no. Sorry to be so hard-line about this, but no.
>
> Here's a quick benchmark comparing clamp with one template type
> parameter vs. three:
<snip>
> Personally, I value that performance benefit above the
> easier-to-describe semantics that you want.
I notice that you *completely* skirted the question of what this
algorithm does and how it's documented.
Or, put another way, I can make that algorithm infinitely fast, since it
has no semantic description. It's easy to be fast if you don't care
about getting the right answer.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk