|
Boost Users : |
Subject: Re: [Boost-users] Why use 'functional composition' with boost::bind
From: WB (w.brenig_at_[hidden])
Date: 2010-08-04 15:22:54
On Wed, 04 Aug 2010 17:56:43 +0100
Mathias Gaunard <mathias.gaunard_at_[hidden]> wrote:
> You don't seem to understand what 2*_1 is. It's a lambda expression.
> You also seem to be confusing Boost.Lambda, Boost.Bind, and the
> standard function object helpers.
hmm?
http://www.boost.org/doc/libs/1_43_0/doc/html/lambda/s08.html#id1365369
<snip>
Basically, the Boost Bind library (BB in the sequel) implements the
bind expression part of BLL.
<snap>
and I did not experience any difference if using lambda's bind
or the original bind
> I ran your test.
> Case 3 runs in 0.65s, case 1 and 2 in 0.82s.
> > Case 3 runs in ~1.8...1.9s, case 1 and 2 in 0.81...0.84s
> > (I compile with gcc -O3 -Wall -lstdc++, nothing special)
>
> > Now I'm really curious what your compiler is ?
> I used g++ -O3 -fomit-frame-pointer -march=native
> Ubuntu Linux, Intel Core 2 Duo.
Ok., so I use your
g++ -O3 -fomit-frame-pointer -march=native
SuSE Linux, Intel Core 2 Duo P9500 2.53GHz
and I get
Case 3 runs in ~1.8...1.9s, case 1 and 2 in 0.81...0.84s.
This is the same ratio I already had (at least I'm not
confused about that). So your 0.65s for case 3 is
really amazing.
wb
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