|
Boost Users : |
Subject: Re: [Boost-users] Iterating over the seconds of a list of pairs
From: Robert Jones (robertgbjones_at_[hidden])
Date: 2009-08-27 14:03:48
On Thu, Aug 27, 2009 at 11:29 AM, dariomt <dariomt_at_[hidden]> wrote:
>
> PS: when i try to propose using boost I always get: 'Hum... what's the
> overhead
> compared to doing it by hand?'
>
>
>
As ever the answer is to measure it.
I have huge sympathy with this post tho', as it's an issue I often have to
address too.
Unfortunately, when I have done measurements it has generally shown that
there is
some performance penalty to be paid for use of bind/function combinations.
OTOH,
there is some performance penalty to paid for using C/C++ rather than
assembler
too, so where do you draw the line?
The payback of course is clarity of expression, and cleaner representation
of idioms
and algorithms. I'd very much rather code a for_each algorithm than a
for-loop, but
that's because it seems to me to be better. Sometimes my colleagues don't
share
my perspective.
I'd be interested if you find answers to any of these things.
- Rob.
-- ACCU - Professionalism in programming - http://www.accu.org
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net