Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59481 - in sandbox/statistics/detail/assign: boost/assign libs/assign/example libs/assign/test
From: erwann.rogard_at_[hidden]
Date: 2010-02-04 15:35:26


Author: e_r
Date: 2010-02-04 15:35:25 EST (Thu, 04 Feb 2010)
New Revision: 59481
URL: http://svn.boost.org/trac/boost/changeset/59481

Log:
a
Added:
   sandbox/statistics/detail/assign/libs/assign/test/
   sandbox/statistics/detail/assign/libs/assign/test/cref_list_of2_speed.cpp (contents, props changed)
   sandbox/statistics/detail/assign/libs/assign/test/cref_list_of2_speed.h (contents, props changed)
Text files modified:
   sandbox/statistics/detail/assign/boost/assign/cref_list_of2.hpp | 7 -------
   sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.cpp | 1 -
   2 files changed, 0 insertions(+), 8 deletions(-)

Modified: sandbox/statistics/detail/assign/boost/assign/cref_list_of2.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/cref_list_of2.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/cref_list_of2.hpp 2010-02-04 15:35:25 EST (Thu, 04 Feb 2010)
@@ -32,13 +32,6 @@
             
         typedef boost::mpl::void_ top_;
 
- template<typename T,bool do_const>
- struct value : boost::mpl::if_<
- boost::mpl::bool_<do_const>,
- typename add_const<T>::type,
- T
- >{};
-
     template<typename T>
     struct ref{
         typedef boost::assign_detail::assign_reference<T> type;

Modified: sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.cpp
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.cpp (original)
+++ sandbox/statistics/detail/assign/libs/assign/example/cref_list_of2.cpp 2010-02-04 15:35:25 EST (Thu, 04 Feb 2010)
@@ -87,7 +87,6 @@
         
     }
 
-
         os << "<- " << std::endl;
     
 };

Added: sandbox/statistics/detail/assign/libs/assign/test/cref_list_of2_speed.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/detail/assign/libs/assign/test/cref_list_of2_speed.cpp 2010-02-04 15:35:25 EST (Thu, 04 Feb 2010)
@@ -0,0 +1,91 @@
+//////////////////////////////////////////////////////////////////////////////
+// test::cref_list_of2_speed.cpp //
+// //
+// (C) Copyright 2010 Erwann Rogard //
+// Use, modification and distribution are subject to the //
+// Boost Software License, Version 1.0. (See accompanying file //
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
+//////////////////////////////////////////////////////////////////////////////
+#include <boost/timer.hpp>
+#include <ostream>
+#include <vector>
+#include <boost/format.hpp>
+#include <boost/typeof/typeof.hpp>
+#include <boost/assign/list_of.hpp>
+#include <boost/assign/cref_list_of2.hpp>
+#include <libs/assign/test/cref_list_of2_speed.h>
+
+void test_cref_list_of2_speed(std::ostream& os)
+{
+ os << "-> test_cref_listof2_speed : " << std::endl;
+
+ typedef boost::timer timer_;
+ using namespace boost::assign;
+
+ typedef std::vector<int> vec_ints_;
+ typedef boost::format fmt_;
+ int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;
+ fmt_ fmt("n = %1%");
+ fmt_ fmt2("cref_list_of : t = %1%\n");
+ fmt_ fmt3("cref_list_of2 : t = %1%\n");
+ os << fmt_(fmt)%4 << std::endl;
+ {
+ timer_ timer;
+ vec_ints_ vec_ints = cref_list_of<4>(a)(b)(c)(d);
+ double t = timer.elapsed();
+ os << (fmt_(fmt2)%t).str();
+ }
+ {
+ timer_ timer;
+ vec_ints_ vec_ints = cref_list_of2(a)(b)(c)(d);
+ double t = timer.elapsed();
+ os << (fmt_(fmt3)%t).str();
+ }
+ os << fmt_(fmt)%10 << std::endl;
+ {
+ timer_ timer;
+ vec_ints_ vec_ints = ref_list_of<10>(a)(b)(c)(d)(e)(f)(g)(h)(i)(j);
+ double t = timer.elapsed();
+ os << (fmt_(fmt2)%t).str();
+ }
+ {
+ timer_ timer;
+ vec_ints_ vec_ints = cref_list_of2(a)(b)(c)(d)(e)(f)(g)(h)(i)(j);
+ double t = timer.elapsed();
+ os << (fmt_(fmt3)%t).str();
+ }
+ os << fmt_(fmt)%28 << std::endl;
+ {
+ timer_ timer;
+ vec_ints_ vec_ints = cref_list_of<28>(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z);
+ double t = timer.elapsed();
+ os << (fmt_(fmt2)%t).str();
+ }
+ {
+ timer_ timer;
+ vec_ints_ vec_ints = cref_list_of2(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z);
+ double t = timer.elapsed();
+ os << (fmt_(fmt3)%t).str();
+ }
+ os << fmt_(fmt)%112 << std::endl;
+ {
+ timer_ timer;
+ vec_ints_ vec_ints = cref_list_of<112>(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)
+ (a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)
+ (a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)
+ (a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z);
+ double t = timer.elapsed();
+ os << (fmt_(fmt2)%t).str();
+ }
+ {
+ timer_ timer;
+ vec_ints_ vec_ints = cref_list_of2(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)
+ (a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)
+ (a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)
+ (a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z);
+ double t = timer.elapsed();
+ os << (fmt_(fmt3)%t).str();
+ }
+
+ os << std::endl;
+}
\ No newline at end of file

Added: sandbox/statistics/detail/assign/libs/assign/test/cref_list_of2_speed.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/detail/assign/libs/assign/test/cref_list_of2_speed.h 2010-02-04 15:35:25 EST (Thu, 04 Feb 2010)
@@ -0,0 +1,15 @@
+//////////////////////////////////////////////////////////////////////////////
+// test::cref_list_of2_speed.h //
+// //
+// (C) Copyright 2010 Erwann Rogard //
+// Use, modification and distribution are subject to the //
+// Boost Software License, Version 1.0. (See accompanying file //
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef LIBS_ASSIGN_TEST_CREF_LIST_OF2_SPEED_ER_2010_HPP
+#define LIBS_ASSIGN_TEST_CREF_LIST_OF2_SPEED_ER_2010_HPP
+#include <ostream>
+
+void test_cref_list_of2_speed(std::ostream&);
+
+#endif


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