Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Eric Niebler <eric <at> boostpro.com>
Subject: Re: tuple benchmarks show marked differences from std::tuple(was Re: Interesting article on stack-based TMP
Newsgroups: gmane.comp.lib.boost.devel
Date: Wednesday 24th October 2012 19:09:34 UTC (over 4 years ago)
On 10/24/2012 8:47 AM, Larry Evans wrote:
> The attached is the output .txt file produced by running:
> 
> http://svn.boost.org/svn/boost/sandbox/variadic_templates/sandbox/slim/test/tuple_benchmark_run.py
> 
> while in the working directory produced by `svn checkout` on the above
> svn directory.  It shows that with std::tuple, the compile times are 4
> times as long as with the "horizontal" tuple implementation which uses
> no preprocessing.  It also shows the "horizontal" is about the same as
> the "vertical" which does use preprocessing.  The "horizontal" trick
> (as Douglas Gregor has explained elsewhere) is to use multiple
> inheritance where the tuple elements are "paired" with the key to
> retrieve them.

Without seeing the different header files referenced by your benchmark
program, or the tuple client code, it's impossible for anyone to draw
any conclusions from your numbers.

I presented at BoostCon my own benchmarks of tuple with and without
preprocessing. The results were unambiguously and strongly in favor of
unrolling with the preprocessor. Tested with gcc. The presentation is here:

https://github.com/boostcon/cppnow_presentations_2012/blob/master/mon/trouble_with_tuples.pptx

The source code is here:

https://github.com/ericniebler/home/tree/master/src/tuple

> I thought it also interesting that clang seems to do better than gcc,
> as reported here:
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54710#c10

Interesting. I didn't test with clang.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
 
CD: 2ms