Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82692 - sandbox/varray/example
From: athundt_at_[hidden]
Date: 2013-02-06 20:24:17


Author: ahundt
Date: 2013-02-02 17:12:25 EST (Sat, 02 Feb 2013)
New Revision: 82692
URL: http://svn.boost.org/trac/boost/changeset/82692

Log:
added vector test with stack allocator to varray bench
Text files modified:
   sandbox/varray/example/bench_varray.cpp | 6 +++++-
   1 files changed, 5 insertions(+), 1 deletions(-)

Modified: sandbox/varray/example/bench_varray.cpp
==============================================================================
--- sandbox/varray/example/bench_varray.cpp (original)
+++ sandbox/varray/example/bench_varray.cpp 2013-02-02 17:12:25 EST (Sat, 02 Feb 2013)
@@ -15,6 +15,7 @@
  *
  */
  
+#include "stack_allocator.hpp"
 #include "boost/container/varray.hpp"
 #include "boost/container/vector.hpp"
 #include <vector>
@@ -93,8 +94,11 @@
         std::cout << "varray benchmark:\n";
         cpu_times tsv = time_it<boost::container::varray<boost::container::varray<std::size_t,N>,N > >();
         
+ std::cout << "vector benchmark with stack allocation\n";
+ cpu_times tvs = time_it<boost::container::vector<boost::container::vector<std::size_t> > >();
+
         std::cout << "vector benchmark\n";
- cpu_times tv = time_it<boost::container::vector<boost::container::vector<std::size_t> > >();
+ cpu_times tv = time_it<boost::container::vector<boost::container::vector<std::size_t,boost::signals2::detail::stack_allocator<std::size_t,N> > > >();
         
         std::cout << "varray/vector total time comparison:"
         << "\n wall = " << ((double)tsv.wall/(double)tv.wall)


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk