Boost logo

Boost :

Subject: Re: [boost] [local] Help for the Alternatives section
From: lcaminiti (lorcaminiti_at_[hidden])
Date: 2011-03-28 13:51:45


Thomas Heller-7 wrote:
>
> On Monday, March 28, 2011 07:03:46 PM lcaminiti wrote:
> >
> > Thomas Heller-7 wrote:
> > >
> > > On Monday, March 28, 2011 05:25:13 AM Jeremy Maitin-Shepard
> wrote:
> > > > On 03/26/2011 03:19 PM, Lorenzo Caminiti wrote:
> > > > > Hello all,
> > > > >
> > > > > I am updating Boost.Local docs and I could use
> a some help in
> > > getting
> > > > > the Alternatives section right
> > > > >
> > >
> http://svn.boost.org/svn/boost/sandbox/local/libs/local/doc/html/boost_local/Alternatives.html
> > > >
> > > > You might include compile time and run time benchmarks,
> information
> > > > about error message quality, and polymorphic
> capabilities.
> > > > Additionally, you might note that with C++0x local
> classes can be
> > > used
> > > > with templates.
> > >
> > > Just did a quick test ... code is attached ...
> > >
> > > $ time g++ -O3 -I. -Wall -Wextra add.cpp -o add
> > >
> > > real 0m0.657s
> > > user 0m0.583s
> > > sys 0m0.067s
> > >
> > > $ time ./add
> > > 1e+12
> > >
> > > real 0m35.641s
> > > user 0m35.618s
> > > sys 0m0.017s
> > >
> > > $ time g++ -O3 -I. -Wall -Wextra add_boost_phoenix.cpp -o
> add_phoenix
> > >
> > > real 0m3.385s
> > > user 0m3.160s
> > > sys 0m0.217s
> > > thomas_at_sunshine ~/programming/local $ time ./add_phoenix
> > > 1e+12
> > >
> > > real 0m6.648s
> > > user 0m6.643s
> > > sys 0m0.007s
> > >
> >
> > This is not a fare comparison because add.cpp contains also local
> blocks and
> > exits while add_boost_phoenix.cpp contains only local functions. The
> > comparison should be made between add_boost_local.cpp and
> > add_boost_phoenix.cpp (see below). The example names got a bit
> confusing and
> > I will rename add.cpp to add_funciton_block_exit.cpp to avoid similar
> > misunderstandings in the future.
>
> Seriously? Did you even look at the files i attached?
>

Ooops... no, I didn't. I have files with the exact same name in
sandbox/local/libs/local/examples so I assumed you attached these files...

> Are you serious? Please write real benchmarks. By executing the resulting
> binaries of your code examples, the runtime is mainly dominated by process
> setup
> and the output on stdout.
>
> Take a look here:
> https://svn.boost.org/svn/boost/trunk/libs/spirit/optimization/
>

I have looked at the files you have attached now and I see what you mean.
Please scratch my previous benchmark numbers. I will run correct tests more
along the lines of what you suggested.

> Again: Seriously?
>

Well... yes seriously... but seriously wrong :)

--Lorenzo

--
View this message in context: http://boost.2283326.n4.nabble.com/local-Help-for-the-Alternatives-section-tp3408469p3412524.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk