|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54119 - sandbox/monotonic/libs/monotonic/test
From: christian.schladetsch_at_[hidden]
Date: 2009-06-19 21:02:54
Author: cschladetsch
Date: 2009-06-19 21:02:54 EDT (Fri, 19 Jun 2009)
New Revision: 54119
URL: http://svn.boost.org/trac/boost/changeset/54119
Log:
updated
Text files modified:
sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp | 59 ++++++---
sandbox/monotonic/libs/monotonic/test/results_gcc.txt | 240 ++++++++++++++++++---------------------
2 files changed, 151 insertions(+), 148 deletions(-)
Modified: sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/compare_memory_pool.cpp 2009-06-19 21:02:54 EDT (Fri, 19 Jun 2009)
@@ -237,11 +237,12 @@
template <class Fun>
PoolResult run_test(size_t count, size_t length, Fun fun, Type types)
{
- typedef Allocator<Type::FastPool, void> fast_pool_alloc;
- typedef Allocator<Type::Pool, void> pool_alloc;
- typedef Allocator<Type::Monotonic, void> mono_alloc;
- typedef Allocator<Type::TBB, void> tbb_alloc;
- typedef Allocator<Type::Standard, void> std_alloc;
+ // boost::pool<void> fails trying to form reference to void
+ typedef Allocator<Type::FastPool, int> fast_pool_alloc;
+ typedef Allocator<Type::Pool, int> pool_alloc;
+ typedef Allocator<Type::Monotonic, int> mono_alloc;
+ typedef Allocator<Type::TBB, int> tbb_alloc;
+ typedef Allocator<Type::Standard, int> std_alloc;
PoolResult result;
@@ -358,15 +359,18 @@
void print(PoolResults const &results)
{
- size_t w = 6;
+ size_t w = 10;
//cout << setw(4) << "len" << setw(w) << "tbb" << setw(w) << "fastp" << setw(w) << "pool" << setw(w) << "std" << setw(w) << "mono" << setw(w) << "fast/m" << setw(w) << "pool/m" << setw(w) << "std/m" << setw(w) << "tbb/m" << endl;
- cout << setw(4) << "len" << setw(w) << "fastp" << setw(w) << "pool" << setw(w) << "std" << setw(w) << "tbb" << setw(w) << "mono" << setw(w) << "local" << setw(w) << "fast/m" << setw(w) << "pool/m" << setw(w) << "std/m" << setw(w) << "tbb/m" << setw(w) << "tbb/l" << endl;
- cout << setw(0) << "------------------------------------------------------------------------------" << endl;
+ //cout << setw(4) << "len" << setw(w) << "fastp" << setw(w) << "pool" << setw(w) << "std" << setw(w) << "tbb" << setw(w) << "mono" << setw(w) << "local" << setw(w) << "fast/m" << setw(w) << "pool/m" << setw(w) << "std/m" << setw(w) << "tbb/m" << setw(w) << "tbb/l" << endl;
+ cout << setw(4) << "len" << setw(w) << "fast/m" << setw(w) << "pool/m" << setw(w) << "std/m" << setw(w) << "tbb/m" << setw(w) << "tbb/l" << endl;
+ //cout << setw(0) << "------------------------------------------------------------------------------" << endl;
+ cout << setw(0) << "------------------------------------------------------" << endl;
BOOST_FOREACH(PoolResults::value_type const &iter, results)
{
PoolResult const &result = iter.second;
//cout << setw(4) << iter.first << setprecision(3) << setw(w) << result.tbb_elapsed << setw(w) << result.fast_pool_elapsed << setw(w) << result.pool_elapsed << setw(w) << result.std_elapsed << setw(w) << result.mono_elapsed << setw(w) << result.fast_pool_elapsed/result.mono_elapsed << setw(w) << result.pool_elapsed/result.mono_elapsed << setw(w) << result.std_elapsed/result.mono_elapsed << setw(w) << result.tbb_elapsed/result.mono_elapsed <<endl;
- cout << setw(4) << iter.first << setprecision(4) << setw(w) << result.fast_pool_elapsed << setw(w) << result.pool_elapsed << setw(w) << result.std_elapsed << setw(w) << result.tbb_elapsed << setw(w) << result.mono_elapsed << setw(w) << result.local_mono_elapsed << setw(w) << setprecision(3) << result.fast_pool_elapsed/result.mono_elapsed << setw(w) << result.pool_elapsed/result.mono_elapsed << setw(w) << result.std_elapsed/result.mono_elapsed << setw(w) << result.tbb_elapsed/result.mono_elapsed << setw(w) << result.tbb_elapsed/result.local_mono_elapsed << endl;
+ //cout << setw(4) << iter.first << setprecision(4) << setw(w) << result.fast_pool_elapsed << setw(w) << result.pool_elapsed << setw(w) << result.std_elapsed << setw(w) << result.tbb_elapsed << setw(w) << result.mono_elapsed << setw(w) << result.local_mono_elapsed << setw(w) << setprecision(3) << result.fast_pool_elapsed/result.mono_elapsed << setw(w) << result.pool_elapsed/result.mono_elapsed << setw(w) << result.std_elapsed/result.mono_elapsed << setw(w) << result.tbb_elapsed/result.mono_elapsed << setw(w) << result.tbb_elapsed/result.local_mono_elapsed << endl;
+ cout << setw(4) << iter.first << setprecision(3) << setw(w) << result.fast_pool_elapsed/result.mono_elapsed << setw(w) << result.pool_elapsed/result.mono_elapsed << setw(w) << result.std_elapsed/result.mono_elapsed << setw(w) << result.tbb_elapsed/result.mono_elapsed << setw(w) << result.tbb_elapsed/result.local_mono_elapsed << endl;
}
cout << endl;
}
@@ -375,23 +379,36 @@
{
boost::timer timer;
Type test_map_vector_types;
- test_map_vector_types.Exclude(Type::FastPool);
+ Type test_dupe_list_types;
- print(run_tests(50, 200, 5, "set_vector", test_set_vector()));
- print(run_tests(500, 200, 10, "map_vector<int>", test_map_vector<int>(), test_map_vector_types));
- print(run_tests(500, 200, 10, "sort_list<int>", test_sort_list<int>()));
- print(run_tests(2000, 2000, 10, "sort_vector<int>", test_sort_vector<int>()));
-
- print(run_tests(500, 2000, 10, "dupe_list", test_dupe_list()));
+ ///test_map_vector_types.Exclude(Type::FastPool);
+ ///test_dupe_list_types.Exclude(Type::Pool);
+ size_t scale = 1;
+#ifndef WIN32
+ scale = 50;
+#else
+ // these are very slow with MSVC
+#endif
+
+ print(run_tests(20000, 1000, 10, "sort_vector<int>", test_sort_vector<int>()));
+ print(run_tests(5000, 1000, 10, "sort_list<int>", test_sort_list<int>()));
+
+#ifndef WIN32
+ print(run_tests(1000000, 10000, 10, "dupe_vector", test_dupe_vector()));
+ print(run_tests(20000, 1000, 10, "dupe_list", test_dupe_list(), test_dupe_list_types));
+ print(run_tests(5000000, 2000, 10, "vector_accumulate", test_vector_accumulate()));
+ print(run_tests(2000, 1000, 10, "vector_random_sort", test_vector_random_sort()));
+ print(run_tests(5000, 500, 10, "set_vector", test_set_vector()));
+#else
print(run_tests(1000, 10000, 10, "dupe_vector", test_dupe_vector()));
+ print(run_tests(500, 2000, 10, "dupe_list", test_dupe_list(), test_dupe_list_types));
print(run_tests(50000, 2000, 10, "vector_accumulate", test_vector_accumulate()));
print(run_tests(1000, 1000, 10, "vector_random_sort", test_vector_random_sort()));
+ print(run_tests(20, 500, 5, "set_vector", test_set_vector()));
+#endif
- //PrintResults(compare_memory_pool(50000, 2000, 10, "vector_accumulate_unaligned", test_vector_accumulate_unaligned()));
- //PrintResults(compare_memory_pool(100, 1000, 10, "map_vector<int>", test_map_vector<int>()));
- //PrintResults(compare_memory_pool(100, 1000, 10, "map_vector<Unaligned>", test_map_vector<Unaligned>()));
-
- cout << "tests completed in " << setprecision(2) << timer.elapsed() << "s" << endl;
+ print(run_tests(500, 1000, 10, "map_vector<int>", test_map_vector<int>(), test_map_vector_types));
+ cout << "tests completed in " << timer.elapsed() << "s" << endl;
return 0;
}
Modified: sandbox/monotonic/libs/monotonic/test/results_gcc.txt
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/results_gcc.txt (original)
+++ sandbox/monotonic/libs/monotonic/test/results_gcc.txt 2009-06-19 21:02:54 EDT (Fri, 19 Jun 2009)
@@ -1,129 +1,115 @@
-At revision 54105.
+At revision 54118.
g++ (Ubuntu 4.3.3-5ubuntu4) 4.3.3
-thrash_pool_map_vector_unaligned: reps=500, len=500, steps=10..........
-length tbb fastp pool std mono fast/m pool/m std/m tbb/m
-------------------------------------------------------------------------------
- 10 0 0 0 0 0 nan% nan% nan% nan%
- 60 0 0.05 0 0 0.01 500% 0% 0% 0%
- 110 0.01 0.17 0.01 0.01 0.01 1.7e+03% 100% 100% 100%
- 160 0.01 0.53 0.01 0.01 0.01 5.3e+03% 100% 100% 100%
- 210 0.02 0.85 0.02 0.02 0.01 8.5e+03% 200% 200% 200%
- 260 0.01 1.43 0.03 0.02 0.011.43e+04% 300% 200% 100%
- 310 0.02 2.93 0.03 0.02 0.021.46e+04% 150% 100% 100%
- 360 0.04 5.82 0.03 0.02 0.022.91e+04% 150% 100% 200%
- 410 0.03 3.37 0.04 0.03 0.031.12e+04% 133% 100% 100%
- 460 0.04 11.2 0.05 0.03 0.025.59e+04% 250% 150% 200%
-
-thrash_pool_sort_list_int: reps=100, len=1000, steps=10..........
-length tbb fastp pool std mono fast/m pool/m std/m tbb/m
-------------------------------------------------------------------------------
- 10 0 0.01 0 0 0 inf% nan% nan% nan%
- 110 0 0 0 0.01 0 nan% nan% inf% nan%
- 210 0.01 0 0.01 0 0.01 0% 100% 0% 100%
- 310 0.01 0.01 0.01 0.01 0.01 100% 100% 100% 100%
- 410 0.01 0 0.02 0 0.01 0% 200% 0% 100%
- 510 0.02 0 0.03 0.01 0 nan% inf% inf% inf%
- 610 0.01 0.01 0.03 0.01 0.01 100% 300% 100% 100%
- 710 0.02 0.01 0.03 0.02 0.01 100% 300% 200% 200%
- 810 0.02 0.01 0.04 0.02 0.01 100% 400% 200% 200%
- 910 0.02 0.02 0.05 0.02 0.02 100% 250% 100% 100%
-
-test_set_vector: reps=500, len=1000, steps=10..........
-length tbb fastp pool std mono fast/m pool/m std/m tbb/m
-------------------------------------------------------------------------------
- 10 0 0 0 0 0 nan% nan% nan% nan%
- 110 0.03 0.01 0.02 0.01 0 inf% inf% inf% inf%
- 210 0.02 0.02 0.03 0.03 0.01 200% 300% 300% 200%
- 310 0.04 0.02 0.05 0.04 0.03 66.7% 167% 133% 133%
- 410 0.05 0.04 0.06 0.06 0.03 133% 200% 200% 167%
- 510 0.07 0.05 0.09 0.07 0.05 100% 180% 140% 140%
- 610 0.08 0.05 0.09 0.09 0.05 100% 180% 180% 160%
- 710 0.08 0.07 0.13 0.09 0.05 140% 260% 180% 160%
- 810 0.11 0.07 0.16 0.11 0.06 117% 267% 183% 183%
- 910 0.13 0.08 0.18 0.13 0.08 100% 225% 162% 162%
-
-test_dupe_list: reps=500, len=2000, steps=10..........
-length tbb fastp pool std mono fast/m pool/m std/m tbb/m
-------------------------------------------------------------------------------
- 10 0 0 0.01 0 0 nan% inf% nan% nan%
- 210 0.01 0 0.05 0.01 0 nan% inf% inf% inf%
- 410 0.03 0 0.14 0.03 0 nan% inf% inf% inf%
- 610 0.04 0.01 0.29 0.04 0.01 100% 2.9e+03% 400% 400%
- 810 0.04 0.01 0.49 0.05 0.02 50%2.45e+03% 250% 200%
- 1010 0.06 0.01 0.73 0.07 0.02 50%3.65e+03% 350% 300%
- 1210 0.08 0.02 1 0.07 0.02 100% 5e+03% 350% 400%
- 1410 0.09 0.02 1.4 0.07 0.03 66.7%4.67e+03% 233% 300%
- 1610 0.1 0.02 1.77 0.1 0.03 66.7% 5.9e+03% 333% 333%
- 1810 0.12 0.02 2.19 0.12 0.04 50%5.48e+03% 300% 300%
-
-test_dupe_vector: reps=500, len=2000, steps=10..........
-length tbb fastp pool std mono fast/m pool/m std/m tbb/m
-------------------------------------------------------------------------------
- 10 0 0 0 0 0 nan% nan% nan% nan%
- 210 0 0 0 0 0 nan% nan% nan% nan%
- 410 0 0 0 0 0 nan% nan% nan% nan%
- 610 0 0 0 0 0 nan% nan% nan% nan%
- 810 0 0 0 0 0 nan% nan% nan% nan%
- 1010 0 0 0 0 0 nan% nan% nan% nan%
- 1210 0 0 0 0 0 nan% nan% nan% nan%
- 1410 0 0 0.01 0 0 nan% inf% nan% nan%
- 1610 0 0 0 0 0 nan% nan% nan% nan%
- 1810 0 0 0 0 0 nan% nan% nan% nan%
-
-thrash_pool: reps=50000, len=2000, steps=10..........
-length tbb fastp pool std mono fast/m pool/m std/m tbb/m
-------------------------------------------------------------------------------
- 10 0 0.02 0.02 0.01 0 inf% inf% inf% nan%
- 210 0.01 0.01 0 0.01 0 inf% nan% inf% inf%
- 410 0 0.02 0.01 0.01 0.01 200% 100% 100% 0%
- 610 0 0.01 0.02 0.01 0 inf% inf% inf% nan%
- 810 0 0.01 0.02 0.01 0 inf% inf% inf% nan%
- 1010 0.01 0 0.02 0.02 0 nan% inf% inf% inf%
- 1210 0 0.01 0.02 0.01 0 inf% inf% inf% nan%
- 1410 0 0.02 0.02 0.01 0 inf% inf% inf% nan%
- 1610 0.01 0.01 0.01 0.01 0 inf% inf% inf% inf%
- 1810 0.01 0.01 0.01 0.01 0.01 100% 100% 100% 100%
-
-thrash_pool_iter: reps=50000, len=2000, steps=10..........
-length tbb fastp pool std mono fast/m pool/m std/m tbb/m
-------------------------------------------------------------------------------
- 10 0.01 0.02 0.01 0.01 0.01 200% 100% 100% 100%
- 210 0.03 0.06 0.11 0.02 0.02 300% 550% 100% 150%
- 410 0.04 0.11 0.2 0.04 0.03 367% 667% 133% 133%
- 610 0.05 0.17 0.16 0.05 0.04 425% 400% 125% 125%
- 810 0.07 0.22 0.21 0.07 0.06 367% 350% 117% 117%
- 1010 0.08 0.26 0.24 0.07 0.06 433% 400% 117% 133%
- 1210 0.08 0.29 0.33 0.1 0.07 414% 471% 143% 114%
- 1410 0.11 0.35 0.34 0.1 0.1 350% 340% 100% 110%
- 1610 0.13 0.4 0.4 0.11 0.12 333% 333% 91.7% 108%
- 1810 0.14 0.46 0.43 0.14 0.13 354% 331% 108% 108%
-
-thrash_pool_sort: reps=1000, len=1000, steps=10..........
-length tbb fastp pool std mono fast/m pool/m std/m tbb/m
-------------------------------------------------------------------------------
- 10 0 0.01 0 0.01 0 inf% nan% inf% nan%
- 110 0.01 0.07 0.01 0.02 0.01 700% 100% 200% 100%
- 210 0.01 0.17 0.02 0.01 0.01 1.7e+03% 200% 100% 100%
- 310 0.02 0.48 0.02 0.02 0.02 2.4e+03% 100% 100% 100%
- 410 0.03 0.68 0.02 0.03 0.032.27e+03% 66.7% 100% 100%
- 510 0.04 1.9 0.05 0.04 0.036.33e+03% 167% 133% 133%
- 610 0.06 1.56 0.04 0.04 0.053.12e+03% 80% 80% 120%
- 710 0.07 4.49 0.07 0.06 0.067.48e+03% 117% 100% 117%
- 810 0.07 2.29 0.07 0.06 0.073.27e+03% 100% 85.7% 100%
- 910 0.06 4.36 0.06 0.07 0.152.91e+03% 40% 46.7% 40%
-
-thrash_pool_map_list_unaligned: reps=1000, len=2000, steps=10..........
-length tbb fastp pool std mono fast/m pool/m std/m tbb/m
-------------------------------------------------------------------------------
- 10 0 0 0 0 0 nan% nan% nan% nan%
- 210 0.04 0.02 0.04 0.04 0.02 100% 200% 200% 200%
- 410 0.07 0.04 0.12 0.06 0.04 100% 300% 150% 175%
- 610 0.09 0.06 0.32 0.11 0.06 100% 533% 183% 150%
- 810 0.11 0.08 0.37 0.16 0.09 88.9% 411% 178% 122%
- 1010 0.14 0.11 0.5 0.18 0.15 73.3% 333% 120% 93.3%
- 1210 0.19 0.13 0.81 0.22 0.15 86.7% 540% 147% 127%
- 1410 0.22 0.16 0.94 0.24 0.18 88.9% 522% 133% 122%
- 1610 0.26 0.18 1.13 0.3 0.21 85.7% 538% 143% 124%
- 1810 0.3 0.21 1.45 0.33 0.22 95.5% 659% 150% 136%
+sort_vector<int>: reps=20000, len=1000, steps=10..........
+ len fast/m pool/m std/m tbb/m tbb/l
+------------------------------------------------------
+ 10 2 2 2 2 2
+ 110 inf inf inf inf 1
+ 210 1.25 1.5 1 1.25 1.25
+ 310 1.57 1.14 1 1.14 1.14
+ 410 1.5 1.62 0.875 1.12 1.12
+ 510 1.4 1.6 0.9 1.1 1.1
+ 610 1.33 1.4 1.13 0.867 0.812
+ 710 1.29 1.35 1 1 1.06
+ 810 1.33 1.22 1 1.06 1.12
+ 910 1.3 1.4 0.8 0.9 0.9
+
+sort_list<int>: reps=5000, len=1000, steps=10..........
+ len fast/m pool/m std/m tbb/m tbb/l
+------------------------------------------------------
+ 10 1 0 1 0 nan
+ 110 1 1.33 1.33 1.33 1.6
+ 210 0.727 1.45 1.18 1.36 1.36
+ 310 0.667 1.28 1.22 1.28 1.44
+ 410 0.75 1.29 1.25 1.21 1.38
+ 510 0.862 1.24 1.21 1.34 1.3
+ 610 0.882 1.41 1.38 1.29 1.29
+ 710 0.854 1.32 1.24 1.22 1.35
+ 810 0.867 1.4 1.36 1.29 1.32
+ 910 0.939 1.43 1.47 1.39 1.28
+
+dupe_vector: reps=1000000, len=10000, steps=10..........
+ len fast/m pool/m std/m tbb/m tbb/l
+------------------------------------------------------
+ 10 3.83 4.17 2 1.5 1.5
+1010 3.5 4.83 1.83 1.67 1.43
+2010 3.83 4.83 2 1.33 2
+3010 2.67 3.22 1.22 1 1.8
+4010 3.33 4.67 2 1.67 1.67
+5010 3.43 3.71 1.86 1.14 1.33
+6010 3.14 4 1.71 1.43 1.67
+7010 3.14 4.29 1.57 1 1.4
+8010 3.83 4.33 2 1.33 1.33
+9010 4 4.5 2.17 1.5 1.5
+
+dupe_list: reps=20000, len=1000, steps=10..........
+ len fast/m pool/m std/m tbb/m tbb/l
+------------------------------------------------------
+ 10 inf inf inf inf 3
+ 110 0.75 7 3.25 3.25 3.71
+ 210 0.647 9.24 3.12 2.82 3.2
+ 310 0.739 13.4 3.39 3.26 3.26
+ 410 0.571 14.7 3.03 2.77 3.23
+ 510 0.571 18.3 2.9 2.98 3.57
+ 610 0.638 23 3.04 3.15 3.36
+ 710 0.596 26 2.96 3.02 3.25
+ 810 0.641 28.7 3.06 3 3.49
+ 910 0.648 32.7 3.32 3.13 3.47
+
+vector_accumulate: reps=5000000, len=2000, steps=10..........
+ len fast/m pool/m std/m tbb/m tbb/l
+------------------------------------------------------
+ 10 5.55 6.1 1.45 1.6 1.33
+ 210 4.91 5.41 1.41 1.36 1.36
+ 410 5.84 6.21 1.53 1.58 1.3
+ 610 5.68 6.21 1.68 1.63 1.41
+ 810 5.68 6.42 1.58 1.47 1.33
+1010 5.24 5.67 1.38 1.48 1.35
+1210 6.11 6.61 1.67 1.67 1.36
+1410 5.35 6 1.55 1.5 1.3
+1610 5.94 6.56 1.61 1.72 1.29
+1810 5.4 6.1 1.6 1.5 1.5
+
+vector_random_sort: reps=2000, len=1000, steps=10..........
+ len fast/m pool/m std/m tbb/m tbb/l
+------------------------------------------------------
+ 10 inf nan inf nan nan
+ 110 21 2 1 1 0.5
+ 210 27 1 1 1.33 1.33
+ 310 63 1.75 1.25 1.25 1
+ 410 64.8 1.4 1.6 1 0.833
+ 510 99.2 1 1 1 1.14
+ 610 103 1.12 1.25 1.25 1
+ 710 126 1.09 1 0.818 0.818
+ 810 95.2 1.17 1.17 1.08 1.08
+ 910 173 1.07 0.933 0.8 0.857
+
+set_vector: reps=5000, len=500, steps=10..........
+ len fast/m pool/m std/m tbb/m tbb/l
+------------------------------------------------------
+ 10 1 1 2 2 2
+ 60 1 1 1.4 1.2 1.5
+ 110 0.9 1.4 1.4 1.4 1.75
+ 160 0.857 1.43 1.36 1.36 1.46
+ 210 1.06 1.44 1.56 1.39 1.47
+ 260 1.1 1.71 1.62 1.48 1.29
+ 310 0.96 1.8 1.76 1.52 1.27
+ 360 1 1.74 1.55 1.45 1.41
+ 410 0.919 1.73 1.51 1.35 1.47
+ 460 0.977 1.86 1.47 1.51 1.41
+
+map_vector<int>: reps=500, len=1000, steps=10..........
+ len fast/m pool/m std/m tbb/m tbb/l
+------------------------------------------------------
+ 10 0 0 0 0 nan
+ 110 inf inf inf nan nan
+ 210 inf inf inf inf 0.5
+ 310 221 1 1.5 1 2
+ 410 490 2 2 1 1
+ 510 950 3 3 1.5 1.5
+ 610 1.25e+03 2.33 1.67 1 0.75
+ 710 1.6e+03 2 2 1.25 1.25
+ 810 1.91e+03 2 1.8 1.2 1.5
+ 910 2.73e+03 2.4 2 1.2 1
-tests completed in 79s
+tests completed in 647s
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