Divided set benchmark in several smaller benchmark files

This commit is contained in:
Ion Gaztañaga
2014-02-06 11:13:22 +01:00
parent a4b839628a
commit a4c0188173
23 changed files with 1700 additions and 520 deletions

View File

@@ -0,0 +1,29 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2013-2013. Distributed under 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)
//
// See http://www.boost.org/libs/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include "boost/container/set.hpp"
#include "boost/container/flat_set.hpp"
#include "bench_set.hpp"
int main()
{
using namespace boost::container;
fill_range_ints();
fill_range_strings();
//flat_set vs set
launch_tests< flat_multiset<int> , multiset<int> >
("flat_multiset<int>", "multiset<int>");
launch_tests< flat_multiset<string> , multiset<string> >
("flat_multiset<string>", "multiset<string>");
return 0;
}

29
bench/bench_flat_set.cpp Normal file
View File

@@ -0,0 +1,29 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2013-2013. Distributed under 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)
//
// See http://www.boost.org/libs/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include "boost/container/set.hpp"
#include "boost/container/flat_set.hpp"
#include "bench_set.hpp"
int main()
{
using namespace boost::container;
fill_range_ints();
fill_range_strings();
//flat_set vs set
launch_tests< flat_set<int> , set<int> >
("flat_set<int>", "set<int>");
launch_tests< flat_set<string> , set<string> >
("flat_set<string>", "set<string>");
return 0;
}

View File

@@ -9,526 +9,27 @@
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#include "boost/container/set.hpp" #include "boost/container/set.hpp"
#include "boost/container/flat_set.hpp"
#include "boost/container/allocator.hpp"
#include <boost/container/vector.hpp>
#include <boost/container/string.hpp>
#include <set> #include <set>
#include <iostream> #include "bench_set.hpp"
#include <boost/timer/timer.hpp>
#include <algorithm>
#include <exception>
#include <sstream>
#include <iomanip>
using boost::timer::cpu_timer;
using boost::timer::cpu_times;
using boost::timer::nanosecond_type;
using namespace boost::container;
#ifdef NDEBUG
static const std::size_t N = 1000;
#else
static const std::size_t N = 100;
#endif
void compare_times(cpu_times time_numerator, cpu_times time_denominator){
std::cout << ((double)time_numerator.wall/(double)time_denominator.wall) << std::endl;
std::cout << "----------------------------------------------" << '\n' << std::endl;
}
vector<int> sorted_unique_range_int;
vector<int> sorted_range_int;
vector<int> random_unique_range_int;
vector<int> random_range_int;
void fill_range_ints()
{
//sorted_unique_range_int
sorted_unique_range_int.resize(N);
for(std::size_t i = 0, max = sorted_unique_range_int.size(); i != max; ++i){
sorted_unique_range_int[i] = static_cast<int>(i);
}
//sorted_range_int
sorted_range_int = sorted_unique_range_int;
sorted_range_int.insert(sorted_range_int.end(), sorted_unique_range_int.begin(), sorted_unique_range_int.end());
std::sort(sorted_range_int.begin(), sorted_range_int.end());
//random_range_int
std::srand(0);
random_range_int.assign(sorted_range_int.begin(), sorted_range_int.end());
std::random_shuffle(random_range_int.begin(), random_range_int.end());
//random_unique_range_int
std::srand(0);
random_unique_range_int.assign(sorted_unique_range_int.begin(), sorted_unique_range_int.end());
std::random_shuffle(random_unique_range_int.begin(), random_unique_range_int.end());
}
vector<string> sorted_unique_range_string;
vector<string> sorted_range_string;
vector<string> random_unique_range_string;
vector<string> random_range_string;
void fill_range_strings()
{
//sorted_unique_range_int
sorted_unique_range_string.resize(N);
for(std::size_t i = 0, max = sorted_unique_range_string.size(); i != max; ++i){
std::stringstream sstr;
sstr << std::setfill('0') << std::setw(10) << i;
sorted_unique_range_string[i] = "really_long_long_prefix_to_ssb_and_increase_comparison_costs_";
const std::string &s = sstr.str();
sorted_unique_range_string[i].append(s.begin(), s.end());
}
//sorted_range_string
sorted_range_string = sorted_unique_range_string;
sorted_range_string.insert(sorted_range_string.end(), sorted_unique_range_string.begin(), sorted_unique_range_string.end());
std::sort(sorted_range_string.begin(), sorted_range_string.end());
//random_range_string
std::srand(0);
random_range_string.assign(sorted_range_string.begin(), sorted_range_string.end());
std::random_shuffle(random_range_string.begin(), random_range_string.end());
//random_unique_range_string
std::srand(0);
random_unique_range_string.assign(sorted_unique_range_string.begin(), sorted_unique_range_string.end());
std::random_shuffle(random_unique_range_string.begin(), random_unique_range_string.end());
}
template<class T>
struct range_provider;
template<>
struct range_provider<int>
{
typedef vector<int> type;
static type &sorted_unique()
{ return sorted_unique_range_int; }
static type &sorted()
{ return sorted_range_int; }
static type &random_unique()
{ return random_unique_range_int; }
static type &random()
{ return random_range_int; }
};
template<>
struct range_provider<string>
{
typedef vector<string> type;
static type &sorted_unique()
{ return sorted_unique_range_string; }
static type &sorted()
{ return sorted_range_string; }
static type &random_unique()
{ return random_unique_range_string; }
static type &random()
{ return random_range_string; }
};
template<typename C>
cpu_times copy_destroy_time(vector<typename C::value_type> &unique_range)
{
cpu_timer copy_timer, assign_timer, destroy_timer;
cpu_timer total_time;
for(std::size_t i = 0; i != N; ++i){
{
C c(unique_range.begin(), unique_range.end());
total_time.resume();
copy_timer.resume();
C caux(c);
copy_timer.stop();
assign_timer.resume();
c = caux;
assign_timer.stop();
destroy_timer.resume();
}
destroy_timer.stop();
total_time.stop();
}
total_time.stop();
std::cout << " Copy sorted range " << boost::timer::format(copy_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Assign sorted range " << boost::timer::format(assign_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Destroy " << boost::timer::format(destroy_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Total time = " << boost::timer::format(total_time.elapsed(), boost::timer::default_places, "%ws\n") << std::endl;
return total_time.elapsed();
}
template<typename C>
cpu_times construct_time(vector<typename C::value_type> &unique_range, vector<typename C::value_type> &range, const char *RangeType)
{
cpu_timer sur_timer, sr_timer;
cpu_timer total_time;
for(std::size_t i = 0; i != N; ++i){
{
sur_timer.resume();
total_time.resume();
C c(unique_range.begin(), unique_range.end());
sur_timer.stop();
total_time.stop();
}
{
total_time.resume();
sr_timer.resume();
C c(range.begin(), range.end());
sr_timer.stop();
total_time.stop();
}
}
std::cout << " Construct " << RangeType << " unique_range " << boost::timer::format(sur_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Construct " << RangeType << " range " << boost::timer::format(sr_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Total time = " << boost::timer::format(total_time.elapsed(), boost::timer::default_places, "%ws\n") << std::endl;
return total_time.elapsed();
}
template<typename C>
cpu_times insert_time(vector<typename C::value_type> &unique_range, vector<typename C::value_type> &range, const char *RangeType)
{
cpu_timer ur_timer,r_timer;
ur_timer.stop();r_timer.stop();
cpu_timer total_time;
total_time.resume();
for(std::size_t i = 0; i != N; ++i){
{
total_time.resume();
ur_timer.resume();
C c;
c.insert(unique_range.begin(), unique_range.end());
ur_timer.stop();
total_time.stop();
}
{
total_time.resume();
r_timer.resume();
C c;
c.insert(range.begin(), range.end());
r_timer.stop();
total_time.stop();
}
}
std::cout << " Insert " << RangeType << " unique_range " << boost::timer::format(ur_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Insert " << RangeType << " range " << boost::timer::format(r_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Total time = " << boost::timer::format(total_time.elapsed(), boost::timer::default_places, "%ws\n") << std::endl;
return total_time.elapsed();
}
template<typename Iterator>
bool check_not_end(vector<Iterator> &iterators, Iterator itend, std::size_t number_of_ends = 0)
{
std::size_t end_count = 0;
for(std::size_t i = 0, max = iterators.size(); i != max; ++i){
if(iterators[i] == itend && (++end_count > number_of_ends) )
return false;
}
return true;
}
template<typename Iterator>
bool check_all_not_empty(vector< std::pair<Iterator, Iterator > > &iterator_pairs)
{
for(std::size_t i = 0, max = iterator_pairs.size(); i != max; ++i){
if(iterator_pairs[i].first == iterator_pairs[i].second)
return false;
}
return true;
}
template<typename C>
cpu_times search_time(vector<typename C::value_type> &unique_range, const char *RangeType)
{
cpu_timer find_timer, lower_timer, upper_timer, equal_range_timer, count_timer;
C c(unique_range.begin(), unique_range.end());
cpu_timer total_time;
total_time.resume();
vector<typename C::iterator> v_it(N);
vector< std::pair<typename C::iterator, typename C::iterator> > v_itp(N);
for(std::size_t i = 0; i != N; ++i){
//Find
{
find_timer.resume();
for(std::size_t rep = 0; rep != 2; ++rep)
for(std::size_t i = 0, max = unique_range.size(); i != max; ++i){
v_it[i] = c.find(unique_range[i]);
}
find_timer.stop();
if(!check_not_end(v_it, c.end())){
std::cout << "ERROR! find all elements not found" << std::endl;
}
}
//Lower
{
lower_timer.resume();
for(std::size_t rep = 0; rep != 2; ++rep)
for(std::size_t i = 0, max = unique_range.size(); i != max; ++i){
v_it[i] = c.lower_bound(unique_range[i]);
}
lower_timer.stop();
if(!check_not_end(v_it, c.end())){
std::cout << "ERROR! lower_bound all elements not found" << std::endl;
}
}
//Upper
{
upper_timer.resume();
for(std::size_t rep = 0; rep != 2; ++rep)
for(std::size_t i = 0, max = unique_range.size(); i != max; ++i){
v_it[i] = c.upper_bound(unique_range[i]);
}
upper_timer.stop();
if(!check_not_end(v_it, c.end(), 1u)){
std::cout << "ERROR! upper_bound all elements not found" << std::endl;
}
}
//Equal
{
equal_range_timer.resume();
for(std::size_t rep = 0; rep != 2; ++rep)
for(std::size_t i = 0, max = unique_range.size(); i != max; ++i){
v_itp[i] = c.equal_range(unique_range[i]);
}
equal_range_timer.stop();
if(!check_all_not_empty(v_itp)){
std::cout << "ERROR! equal_range all elements not found" << std::endl;
}
}
//Count
{
std::size_t count = 0;
count_timer.resume();
for(std::size_t rep = 0; rep != 2; ++rep)
for(std::size_t i = 0, max = unique_range.size(); i != max; ++i){
count += c.count(unique_range[i]);
}
count_timer.stop();
if(count/2 != c.size()){
std::cout << "ERROR! count all elements not found" << std::endl;
}
}
}
total_time.stop();
std::cout << " Find " << RangeType << " " << boost::timer::format(find_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Lower Bound " << RangeType << " " << boost::timer::format(lower_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Upper Bound " << RangeType << " " << boost::timer::format(upper_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Equal Range " << RangeType << " " << boost::timer::format(equal_range_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Count " << RangeType << " " << boost::timer::format(count_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Total time = " << boost::timer::format(total_time.elapsed(), boost::timer::default_places, "%ws\n") << std::endl;
return total_time.elapsed();
}
template<typename C>
void extensions_time(vector<typename C::value_type> &sorted_unique_range)
{
cpu_timer sur_timer,sur_opt_timer;
sur_timer.stop();sur_opt_timer.stop();
for(std::size_t i = 0; i != N; ++i){
{
sur_timer.resume();
C c(sorted_unique_range.begin(), sorted_unique_range.end());
sur_timer.stop();
}
{
sur_opt_timer.resume();
C c(boost::container::ordered_unique_range, sorted_unique_range.begin(), sorted_unique_range.end());
sur_opt_timer.stop();
}
}
std::cout << " Construct sorted_unique_range " << boost::timer::format(sur_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Construct sorted_unique_range (extension) " << boost::timer::format(sur_opt_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << "Extension/Standard: ";
compare_times(sur_opt_timer.elapsed(), sur_timer.elapsed());
}
template<class BoostClass, class StdClass>
void launch_tests(const char *BoostContName, const char *StdContName)
{
typedef range_provider<typename BoostClass::value_type> get_range_t;
try {
std::cout << "**********************************************" << '\n';
std::cout << "**********************************************" << '\n';
std::cout << '\n';
std::cout << BoostContName << " .VS " << StdContName << '\n';
std::cout << '\n';
std::cout << "**********************************************" << '\n';
std::cout << "**********************************************" << '\n' << std::endl;
{
std::cout << "Copy/Assign/Destroy benchmark:" << BoostContName << std::endl;
cpu_times boost_set_time = copy_destroy_time< BoostClass >(get_range_t::sorted_unique());
std::cout << "Copy/Assign/Destroy benchmark:" << StdContName << std::endl;
cpu_times std_set_time = copy_destroy_time< StdClass >(get_range_t::sorted_unique());
std::cout << BoostContName << "/" << StdContName << ": ";
compare_times(boost_set_time, std_set_time);
}
{
std::cout << "Ordered construct benchmark:" << BoostContName << std::endl;
cpu_times boost_set_time = construct_time< BoostClass >(get_range_t::sorted_unique(), get_range_t::sorted(), "(ord)");
std::cout << "Ordered construct benchmark:" << StdContName << std::endl;
cpu_times std_set_time = construct_time< StdClass >(get_range_t::sorted_unique(), get_range_t::sorted(), "(ord)");;
std::cout << BoostContName << "/" << StdContName << ": ";
compare_times(boost_set_time, std_set_time);
}
{
std::cout << "Random construct benchmark:" << BoostContName << std::endl;
cpu_times boost_set_time = construct_time< BoostClass >(get_range_t::random_unique(), get_range_t::random(), "(rnd)");
std::cout << "Random construct benchmark:" << StdContName << std::endl;
cpu_times std_set_time = construct_time< StdClass >(get_range_t::random_unique(), get_range_t::random(), "(rnd)");;
std::cout << BoostContName << "/" << StdContName << ": ";
compare_times(boost_set_time, std_set_time);
}
{
std::cout << "Ordered Insert benchmark:" << BoostContName << std::endl;
cpu_times boost_set_time = insert_time< BoostClass >(get_range_t::sorted_unique(), get_range_t::sorted(), "(ord)");
std::cout << "Ordered Insert benchmark:" << StdContName << std::endl;
cpu_times std_set_time = insert_time< StdClass >(get_range_t::sorted_unique(), get_range_t::sorted(), "(ord)");
std::cout << BoostContName << "/" << StdContName << ": ";
compare_times(boost_set_time, std_set_time);
}
{
std::cout << "Random Insert benchmark:" << BoostContName << std::endl;
cpu_times boost_set_time = insert_time< BoostClass >(get_range_t::random_unique(), get_range_t::random(), "(rnd)");
std::cout << "Random Insert benchmark:" << StdContName << std::endl;
cpu_times std_set_time = insert_time< StdClass >(get_range_t::random_unique(), get_range_t::random(), "(rnd)");
std::cout << BoostContName << "/" << StdContName << ": ";
compare_times(boost_set_time, std_set_time);
}
{
std::cout << "Ordered Search benchmark:" << BoostContName << std::endl;
cpu_times boost_set_time = search_time< BoostClass >(get_range_t::sorted_unique(), "(ord)");
std::cout << "Ordered Search benchmark:" << StdContName << std::endl;
cpu_times std_set_time = search_time< StdClass >(get_range_t::sorted_unique(), "(ord)");
std::cout << BoostContName << "/" << StdContName << ": ";
compare_times(boost_set_time, std_set_time);
}
{
std::cout << "Random Search benchmark:" << BoostContName << std::endl;
cpu_times boost_set_time = search_time< BoostClass >(get_range_t::random_unique(), "(rnd)");
std::cout << "Random Search benchmark:" << StdContName << std::endl;
cpu_times std_set_time = search_time< StdClass >(get_range_t::random_unique(), "(rnd)");
std::cout << BoostContName << "/" << StdContName << ": ";
compare_times(boost_set_time, std_set_time);
}
{
std::cout << "Extensions benchmark:" << BoostContName << std::endl;
extensions_time< BoostClass >(get_range_t::sorted_unique());
}
}catch(std::exception e){
std::cout << e.what();
}
}
int main() int main()
{ {
using namespace boost::container; using namespace boost::container;
//////////////////////////////////
// INT
//////////////////////////////////
fill_range_ints(); fill_range_ints();
//set vs std::set
launch_tests< set<int> , std::set<int> >
("set<int>", "std::set<int>");
//set(RB) vs set(AVL)
launch_tests< set<int>, set<int, std::less<int>, std::allocator<int>, tree_assoc_options< tree_type<avl_tree> >::type > >
("set<int>(RB)", "set<int>(AVL)");
//set(RB) vs set(SG)
launch_tests< set<int>, set<int, std::less<int>, std::allocator<int>, tree_assoc_options< tree_type<scapegoat_tree> >::type > >
("set<int>(RB)", "set<int>(SG)");
//set(RB) vs set(SP)
launch_tests< set<int>, set<int, std::less<int>, std::allocator<int>, tree_assoc_options< tree_type<splay_tree> >::type > >
("set<int>(RB)", "set<int>(SP)");
//set(sizeopt) vs set(!sizeopt)
launch_tests< set<int>, set<int, std::less<int>, std::allocator<int>, tree_assoc_options< optimize_size<false> >::type > >
("set<int>(sizeopt=true)", "set<int>(sizeopt=false)");
//set(AVL,sizeopt) vs set(AVL,!sizeopt)
launch_tests< set<int, std::less<int>, std::allocator<int>, tree_assoc_options< tree_type<avl_tree> >::type >
, set<int, std::less<int>, std::allocator<int>, tree_assoc_options< tree_type<avl_tree>, optimize_size<false> >::type > >
("set<int>(AVL,sizeopt=true)", "set<int>(AVL,sizeopt=false)");
//set vs set<..., allocator_v2>
launch_tests< set<int> , set<int, std::less<int>, allocator<int> > >
("set<int>", "set<int, ..., allocator<int>" );
//multiset vs std::set
launch_tests< multiset<int> , std::multiset<int> >
("multiset<int>", "std::multiset<int>");
//flat_set vs set
launch_tests< flat_set<int> , set<int> >
("flat_set<int>", "set<int>");
//flat_multiset vs multiset
launch_tests< flat_multiset<int> , multiset<int> >
("flat_multiset<int>", "multiset<int>");
//////////////////////////////////
// STRING
//////////////////////////////////
fill_range_strings(); fill_range_strings();
//set vs std::set //set vs std::set
launch_tests< set<int> , std::set<int> >
("set<int>", "std::set<int>");
launch_tests< set<string> , std::set<string> > launch_tests< set<string> , std::set<string> >
("set<string>", "std::set<string>"); ("set<string>", "std::set<string>");
//set(RB) vs set(AVL)
launch_tests< set<string>, set<string, std::less<string>, std::allocator<string>, tree_assoc_options< tree_type<avl_tree> >::type > >
("set<string>(RB)", "set<string>(AVL)");
//set(RB) vs set(SG)
launch_tests< set<string>, set<string, std::less<string>, std::allocator<string>, tree_assoc_options< tree_type<scapegoat_tree> >::type > >
("set<string>(RB)", "set<string>(SG)");
//set(RB) vs set(SP)
launch_tests< set<string>, set<string, std::less<string>, std::allocator<string>, tree_assoc_options< tree_type<splay_tree> >::type > >
("set<string>(RB)", "set<string>(SP)");
//set(sizeopt) vs set(!sizeopt) //set(sizeopt) vs set(!sizeopt)
launch_tests< set<int>, set<int, std::less<int>, std::allocator<int>, tree_assoc_options< optimize_size<false> >::type > >
("set<int>(sizeopt=true)", "set<int>(sizeopt=false)");
launch_tests< set<string>, set<string, std::less<string>, std::allocator<string>, tree_assoc_options< optimize_size<false> >::type > > launch_tests< set<string>, set<string, std::less<string>, std::allocator<string>, tree_assoc_options< optimize_size<false> >::type > >
("set<string>(sizeopt=true)", "set<string>(sizeopt=false)"); ("set<string>(sizeopt=true)", "set<string>(sizeopt=false)");
//set(AVL,sizeopt) vs set(AVL,!sizeopt)
launch_tests< set<string, std::less<string>, std::allocator<string>, tree_assoc_options< tree_type<avl_tree> >::type >
, set<string, std::less<string>, std::allocator<string>, tree_assoc_options< tree_type<avl_tree>, optimize_size<false> >::type > >
("set<string>(AVL,sizeopt=true)", "set<string>(AVL,sizeopt=false)");
//set vs set<..., allocator_v2>
launch_tests< set<string> , set<string, std::less<string>, allocator<string> > >
("set<string>", "set<string, ..., allocator<string>" );
//multiset vs std::set
launch_tests< multiset<string> , std::multiset<string> >
("multiset<string>", "std::multiset<string>");
//flat_set vs set
launch_tests< flat_set<string> , set<string> >
("flat_set<string>", "set<string>");
//flat_multiset vs multiset
launch_tests< flat_multiset<string> , multiset<string> >
("flat_multiset<string>", "multiset<string>");
return 0; return 0;
} }

462
bench/bench_set.hpp Normal file
View File

@@ -0,0 +1,462 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2013-2014. Distributed under 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)
//
// See http://www.boost.org/libs/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_CONTAINER_BENCH_BENCH_SET_HPP
#define BOOST_CONTAINER_BENCH_BENCH_SET_HPP
#include <iostream>
#include <boost/timer/timer.hpp>
#include <algorithm>
#include <exception>
#include <sstream>
#include <iomanip>
#include <boost/container/vector.hpp>
#include <boost/container/string.hpp>
using boost::timer::cpu_timer;
using boost::timer::cpu_times;
using boost::timer::nanosecond_type;
using namespace boost::container;
#ifdef NDEBUG
static const std::size_t NElements = 1000;
#else
static const std::size_t NElements = 100;
#endif
#ifdef NDEBUG
static const std::size_t NIter = 500;
#else
static const std::size_t NIter = 50;
#endif
void compare_times(cpu_times time_numerator, cpu_times time_denominator){
std::cout << ((double)time_numerator.wall/(double)time_denominator.wall) << std::endl;
std::cout << "----------------------------------------------" << '\n' << std::endl;
}
vector<int> sorted_unique_range_int;
vector<int> sorted_range_int;
vector<int> random_unique_range_int;
vector<int> random_range_int;
void fill_range_ints()
{
//sorted_unique_range_int
sorted_unique_range_int.resize(NElements);
for(std::size_t i = 0, max = sorted_unique_range_int.size(); i != max; ++i){
sorted_unique_range_int[i] = static_cast<int>(i);
}
//sorted_range_int
sorted_range_int = sorted_unique_range_int;
sorted_range_int.insert(sorted_range_int.end(), sorted_unique_range_int.begin(), sorted_unique_range_int.end());
std::sort(sorted_range_int.begin(), sorted_range_int.end());
//random_range_int
std::srand(0);
random_range_int.assign(sorted_range_int.begin(), sorted_range_int.end());
std::random_shuffle(random_range_int.begin(), random_range_int.end());
//random_unique_range_int
std::srand(0);
random_unique_range_int.assign(sorted_unique_range_int.begin(), sorted_unique_range_int.end());
std::random_shuffle(random_unique_range_int.begin(), random_unique_range_int.end());
}
vector<string> sorted_unique_range_string;
vector<string> sorted_range_string;
vector<string> random_unique_range_string;
vector<string> random_range_string;
void fill_range_strings()
{
//sorted_unique_range_int
sorted_unique_range_string.resize(NElements);
for(std::size_t i = 0, max = sorted_unique_range_string.size(); i != max; ++i){
std::stringstream sstr;
sstr << std::setfill('0') << std::setw(10) << i;
sorted_unique_range_string[i] = "really_long_long_prefix_to_ssb_and_increase_comparison_costs_";
const std::string &s = sstr.str();
sorted_unique_range_string[i].append(s.begin(), s.end());
}
//sorted_range_string
sorted_range_string = sorted_unique_range_string;
sorted_range_string.insert(sorted_range_string.end(), sorted_unique_range_string.begin(), sorted_unique_range_string.end());
std::sort(sorted_range_string.begin(), sorted_range_string.end());
//random_range_string
std::srand(0);
random_range_string.assign(sorted_range_string.begin(), sorted_range_string.end());
std::random_shuffle(random_range_string.begin(), random_range_string.end());
//random_unique_range_string
std::srand(0);
random_unique_range_string.assign(sorted_unique_range_string.begin(), sorted_unique_range_string.end());
std::random_shuffle(random_unique_range_string.begin(), random_unique_range_string.end());
}
template<class T>
struct range_provider;
template<>
struct range_provider<int>
{
typedef vector<int> type;
static type &sorted_unique()
{ return sorted_unique_range_int; }
static type &sorted()
{ return sorted_range_int; }
static type &random_unique()
{ return random_unique_range_int; }
static type &random()
{ return random_range_int; }
};
template<>
struct range_provider<string>
{
typedef vector<string> type;
static type &sorted_unique()
{ return sorted_unique_range_string; }
static type &sorted()
{ return sorted_range_string; }
static type &random_unique()
{ return random_unique_range_string; }
static type &random()
{ return random_range_string; }
};
template<typename C>
cpu_times copy_destroy_time(vector<typename C::value_type> &unique_range)
{
cpu_timer copy_timer, assign_timer, destroy_timer;
cpu_timer total_time;
for(std::size_t i = 0; i != NIter; ++i){
{
C c(unique_range.begin(), unique_range.end());
total_time.resume();
copy_timer.resume();
C caux(c);
copy_timer.stop();
assign_timer.resume();
c = caux;
assign_timer.stop();
destroy_timer.resume();
}
destroy_timer.stop();
total_time.stop();
}
total_time.stop();
std::cout << " Copy sorted range " << boost::timer::format(copy_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Assign sorted range " << boost::timer::format(assign_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Destroy " << boost::timer::format(destroy_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Total time = " << boost::timer::format(total_time.elapsed(), boost::timer::default_places, "%ws\n") << std::endl;
return total_time.elapsed();
}
template<typename C>
cpu_times construct_time(vector<typename C::value_type> &unique_range, vector<typename C::value_type> &range, const char *RangeType)
{
cpu_timer sur_timer, sr_timer;
cpu_timer total_time;
for(std::size_t i = 0; i != NIter; ++i){
{
sur_timer.resume();
total_time.resume();
C c(unique_range.begin(), unique_range.end());
sur_timer.stop();
total_time.stop();
}
{
total_time.resume();
sr_timer.resume();
C c(range.begin(), range.end());
sr_timer.stop();
total_time.stop();
}
}
std::cout << " Construct " << RangeType << " unique_range " << boost::timer::format(sur_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Construct " << RangeType << " range " << boost::timer::format(sr_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Total time = " << boost::timer::format(total_time.elapsed(), boost::timer::default_places, "%ws\n") << std::endl;
return total_time.elapsed();
}
template<typename C>
cpu_times insert_time(vector<typename C::value_type> &unique_range, vector<typename C::value_type> &range, const char *RangeType)
{
cpu_timer ur_timer,r_timer;
ur_timer.stop();r_timer.stop();
cpu_timer total_time;
total_time.resume();
for(std::size_t i = 0; i != NIter; ++i){
{
total_time.resume();
ur_timer.resume();
C c;
c.insert(unique_range.begin(), unique_range.end());
ur_timer.stop();
total_time.stop();
}
{
total_time.resume();
r_timer.resume();
C c;
c.insert(range.begin(), range.end());
r_timer.stop();
total_time.stop();
}
}
std::cout << " Insert " << RangeType << " unique_range " << boost::timer::format(ur_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Insert " << RangeType << " range " << boost::timer::format(r_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Total time = " << boost::timer::format(total_time.elapsed(), boost::timer::default_places, "%ws\n") << std::endl;
return total_time.elapsed();
}
template<typename Iterator>
bool check_not_end(vector<Iterator> &iterators, Iterator itend, std::size_t number_of_ends = 0)
{
std::size_t end_count = 0;
for(std::size_t i = 0, max = iterators.size(); i != max; ++i){
if(iterators[i] == itend && (++end_count > number_of_ends) )
return false;
}
return true;
}
template<typename Iterator>
bool check_all_not_empty(vector< std::pair<Iterator, Iterator > > &iterator_pairs)
{
for(std::size_t i = 0, max = iterator_pairs.size(); i != max; ++i){
if(iterator_pairs[i].first == iterator_pairs[i].second)
return false;
}
return true;
}
template<typename C>
cpu_times search_time(vector<typename C::value_type> &unique_range, const char *RangeType)
{
cpu_timer find_timer, lower_timer, upper_timer, equal_range_timer, count_timer;
C c(unique_range.begin(), unique_range.end());
cpu_timer total_time;
total_time.resume();
vector<typename C::iterator> v_it(NElements);
vector< std::pair<typename C::iterator, typename C::iterator> > v_itp(NElements);
for(std::size_t i = 0; i != NIter; ++i){
//Find
{
find_timer.resume();
for(std::size_t rep = 0; rep != 2; ++rep)
for(std::size_t i = 0, max = unique_range.size(); i != max; ++i){
v_it[i] = c.find(unique_range[i]);
}
find_timer.stop();
if(!check_not_end(v_it, c.end())){
std::cout << "ERROR! find all elements not found" << std::endl;
}
}
//Lower
{
lower_timer.resume();
for(std::size_t rep = 0; rep != 2; ++rep)
for(std::size_t i = 0, max = unique_range.size(); i != max; ++i){
v_it[i] = c.lower_bound(unique_range[i]);
}
lower_timer.stop();
if(!check_not_end(v_it, c.end())){
std::cout << "ERROR! lower_bound all elements not found" << std::endl;
}
}
//Upper
{
upper_timer.resume();
for(std::size_t rep = 0; rep != 2; ++rep)
for(std::size_t i = 0, max = unique_range.size(); i != max; ++i){
v_it[i] = c.upper_bound(unique_range[i]);
}
upper_timer.stop();
if(!check_not_end(v_it, c.end(), 1u)){
std::cout << "ERROR! upper_bound all elements not found" << std::endl;
}
}
//Equal
{
equal_range_timer.resume();
for(std::size_t rep = 0; rep != 2; ++rep)
for(std::size_t i = 0, max = unique_range.size(); i != max; ++i){
v_itp[i] = c.equal_range(unique_range[i]);
}
equal_range_timer.stop();
if(!check_all_not_empty(v_itp)){
std::cout << "ERROR! equal_range all elements not found" << std::endl;
}
}
//Count
{
std::size_t count = 0;
count_timer.resume();
for(std::size_t rep = 0; rep != 2; ++rep)
for(std::size_t i = 0, max = unique_range.size(); i != max; ++i){
count += c.count(unique_range[i]);
}
count_timer.stop();
if(count/2 != c.size()){
std::cout << "ERROR! count all elements not found" << std::endl;
}
}
}
total_time.stop();
std::cout << " Find " << RangeType << " " << boost::timer::format(find_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Lower Bound " << RangeType << " " << boost::timer::format(lower_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Upper Bound " << RangeType << " " << boost::timer::format(upper_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Equal Range " << RangeType << " " << boost::timer::format(equal_range_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Count " << RangeType << " " << boost::timer::format(count_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Total time = " << boost::timer::format(total_time.elapsed(), boost::timer::default_places, "%ws\n") << std::endl;
return total_time.elapsed();
}
template<typename C>
void extensions_time(vector<typename C::value_type> &sorted_unique_range)
{
cpu_timer sur_timer,sur_opt_timer;
sur_timer.stop();sur_opt_timer.stop();
for(std::size_t i = 0; i != NIter; ++i){
{
sur_timer.resume();
C c(sorted_unique_range.begin(), sorted_unique_range.end());
sur_timer.stop();
}
{
sur_opt_timer.resume();
C c(boost::container::ordered_unique_range, sorted_unique_range.begin(), sorted_unique_range.end());
sur_opt_timer.stop();
}
}
std::cout << " Construct sorted_unique_range " << boost::timer::format(sur_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << " Construct sorted_unique_range (extension) " << boost::timer::format(sur_opt_timer.elapsed(), boost::timer::default_places, "%ws\n");
std::cout << "Extension/Standard: ";
compare_times(sur_opt_timer.elapsed(), sur_timer.elapsed());
}
template<class BoostClass, class StdClass>
void launch_tests(const char *BoostContName, const char *StdContName)
{
typedef range_provider<typename BoostClass::value_type> get_range_t;
try {
std::cout << "**********************************************" << '\n';
std::cout << "**********************************************" << '\n';
std::cout << '\n';
std::cout << BoostContName << " .VS " << StdContName << '\n';
std::cout << '\n';
std::cout << "**********************************************" << '\n';
std::cout << "**********************************************" << '\n' << std::endl;
{
std::cout << "Copy/Assign/Destroy benchmark:" << BoostContName << std::endl;
cpu_times boost_set_time = copy_destroy_time< BoostClass >(get_range_t::sorted_unique());
std::cout << "Copy/Assign/Destroy benchmark:" << StdContName << std::endl;
cpu_times std_set_time = copy_destroy_time< StdClass >(get_range_t::sorted_unique());
std::cout << BoostContName << "/" << StdContName << ": ";
compare_times(boost_set_time, std_set_time);
}
{
std::cout << "Ordered construct benchmark:" << BoostContName << std::endl;
cpu_times boost_set_time = construct_time< BoostClass >(get_range_t::sorted_unique(), get_range_t::sorted(), "(ord)");
std::cout << "Ordered construct benchmark:" << StdContName << std::endl;
cpu_times std_set_time = construct_time< StdClass >(get_range_t::sorted_unique(), get_range_t::sorted(), "(ord)");;
std::cout << BoostContName << "/" << StdContName << ": ";
compare_times(boost_set_time, std_set_time);
}
{
std::cout << "Random construct benchmark:" << BoostContName << std::endl;
cpu_times boost_set_time = construct_time< BoostClass >(get_range_t::random_unique(), get_range_t::random(), "(rnd)");
std::cout << "Random construct benchmark:" << StdContName << std::endl;
cpu_times std_set_time = construct_time< StdClass >(get_range_t::random_unique(), get_range_t::random(), "(rnd)");;
std::cout << BoostContName << "/" << StdContName << ": ";
compare_times(boost_set_time, std_set_time);
}
{
std::cout << "Ordered Insert benchmark:" << BoostContName << std::endl;
cpu_times boost_set_time = insert_time< BoostClass >(get_range_t::sorted_unique(), get_range_t::sorted(), "(ord)");
std::cout << "Ordered Insert benchmark:" << StdContName << std::endl;
cpu_times std_set_time = insert_time< StdClass >(get_range_t::sorted_unique(), get_range_t::sorted(), "(ord)");
std::cout << BoostContName << "/" << StdContName << ": ";
compare_times(boost_set_time, std_set_time);
}
{
std::cout << "Random Insert benchmark:" << BoostContName << std::endl;
cpu_times boost_set_time = insert_time< BoostClass >(get_range_t::random_unique(), get_range_t::random(), "(rnd)");
std::cout << "Random Insert benchmark:" << StdContName << std::endl;
cpu_times std_set_time = insert_time< StdClass >(get_range_t::random_unique(), get_range_t::random(), "(rnd)");
std::cout << BoostContName << "/" << StdContName << ": ";
compare_times(boost_set_time, std_set_time);
}
{
std::cout << "Ordered Search benchmark:" << BoostContName << std::endl;
cpu_times boost_set_time = search_time< BoostClass >(get_range_t::sorted_unique(), "(ord)");
std::cout << "Ordered Search benchmark:" << StdContName << std::endl;
cpu_times std_set_time = search_time< StdClass >(get_range_t::sorted_unique(), "(ord)");
std::cout << BoostContName << "/" << StdContName << ": ";
compare_times(boost_set_time, std_set_time);
}
{
std::cout << "Random Search benchmark:" << BoostContName << std::endl;
cpu_times boost_set_time = search_time< BoostClass >(get_range_t::random_unique(), "(rnd)");
std::cout << "Random Search benchmark:" << StdContName << std::endl;
cpu_times std_set_time = search_time< StdClass >(get_range_t::random_unique(), "(rnd)");
std::cout << BoostContName << "/" << StdContName << ": ";
compare_times(boost_set_time, std_set_time);
}
{
std::cout << "Extensions benchmark:" << BoostContName << std::endl;
extensions_time< BoostClass >(get_range_t::sorted_unique());
}
}catch(std::exception e){
std::cout << e.what();
}
}
#endif //#ifndef BOOST_CONTAINER_BENCH_BENCH_SET_HPP

View File

@@ -0,0 +1,29 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2013-2013. Distributed under 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)
//
// See http://www.boost.org/libs/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include "boost/container/set.hpp"
#include "boost/container/allocator.hpp"
#include "bench_set.hpp"
int main()
{
using namespace boost::container;
fill_range_ints();
fill_range_strings();
//set<..., allocator_v2> vs. set
launch_tests< set<int, std::less<int>, allocator<int> >, set<int> >
("set<int, ..., allocator<int>", "set<int>");
launch_tests< set<string, std::less<string>, allocator<string> >, set<string> >
("set<string, ..., allocator<string>", "set<string>");
return 0;
}

38
bench/bench_set_avl.cpp Normal file
View File

@@ -0,0 +1,38 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2013-2013. Distributed under 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)
//
// See http://www.boost.org/libs/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include "boost/container/set.hpp"
#include <set>
#include "bench_set.hpp"
int main()
{
using namespace boost::container;
fill_range_ints();
fill_range_strings();
//set(AVL) vs set(RB)
launch_tests< set<int, std::less<int>, std::allocator<int>, tree_assoc_options< tree_type<avl_tree> >::type >, set<int> >
("set<int>(AVL)", "set<int>(RB)");
launch_tests< set<string, std::less<string>, std::allocator<string>, tree_assoc_options< tree_type<avl_tree> >::type >, set<string> >
("set<string>(AVL)", "set<string>(RB)");
//set(AVL,sizeopt) vs set(AVL,!sizeopt)
launch_tests< set<int, std::less<int>, std::allocator<int>, tree_assoc_options< tree_type<avl_tree> >::type >
, set<int, std::less<int>, std::allocator<int>, tree_assoc_options< tree_type<avl_tree>, optimize_size<false> >::type > >
("set<int>(AVL,sizeopt=true)", "set<int>(AVL,sizeopt=false)");
launch_tests< set<string, std::less<string>, std::allocator<string>, tree_assoc_options< tree_type<avl_tree> >::type >
, set<string, std::less<string>, std::allocator<string>, tree_assoc_options< tree_type<avl_tree>, optimize_size<false> >::type > >
("set<string>(AVL,sizeopt=true)", "set<string>(AVL,sizeopt=false)");
return 0;
}

30
bench/bench_set_multi.cpp Normal file
View File

@@ -0,0 +1,30 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2013-2013. Distributed under 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)
//
// See http://www.boost.org/libs/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include "boost/container/set.hpp"
#include <set>
#include "bench_set.hpp"
int main()
{
using namespace boost::container;
fill_range_ints();
fill_range_strings();
//multiset vs std::multiset
launch_tests< multiset<int> , std::multiset<int> >
("multiset<int>", "std::multiset<int>");
launch_tests< multiset<string> , std::multiset<string> >
("multiset<string>", "std::multiset<string>");
return 0;
}

28
bench/bench_set_sg.cpp Normal file
View File

@@ -0,0 +1,28 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2013-2013. Distributed under 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)
//
// See http://www.boost.org/libs/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include "boost/container/set.hpp"
#include "bench_set.hpp"
int main()
{
using namespace boost::container;
fill_range_ints();
fill_range_strings();
//set(RB) vs set(SG)
launch_tests< set<int, std::less<int>, std::allocator<int>, tree_assoc_options< tree_type<scapegoat_tree> >::type >, set<int> >
("set<int>(SG)", "set<int>(RB)");
launch_tests< set<string, std::less<string>, std::allocator<string>, tree_assoc_options< tree_type<scapegoat_tree> >::type >, set<string> >
("set<string>(SG)", "set<string>(RB)");
return 0;
}

28
bench/bench_set_sp.cpp Normal file
View File

@@ -0,0 +1,28 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2013-2013. Distributed under 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)
//
// See http://www.boost.org/libs/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include "boost/container/set.hpp"
#include "bench_set.hpp"
int main()
{
using namespace boost::container;
fill_range_ints();
fill_range_strings();
//set(RB) vs set(SP)
launch_tests< set<int, std::less<int>, std::allocator<int>, tree_assoc_options< tree_type<splay_tree> >::type >, set<int> >
("set<int>(SP)", "set<int>(RB)");
launch_tests< set<string, std::less<string>, std::allocator<string>, tree_assoc_options< tree_type<splay_tree> >::type >, set<string> >
("set<string>(SP)", "set<string>(RB)");
return 0;
}

View File

@@ -113,8 +113,10 @@ struct if_
template <class Pair> template <class Pair>
struct select1st struct select1st
// : public std::unary_function<Pair, typename Pair::first_type>
{ {
typedef Pair argument_type;
typedef typename Pair::first_type result_type;
template<class OtherPair> template<class OtherPair>
const typename Pair::first_type& operator()(const OtherPair& x) const const typename Pair::first_type& operator()(const OtherPair& x) const
{ return x.first; } { return x.first; }
@@ -126,8 +128,10 @@ struct select1st
// identity is an extension: it is not part of the standard. // identity is an extension: it is not part of the standard.
template <class T> template <class T>
struct identity struct identity
// : public std::unary_function<T,T>
{ {
typedef T argument_type;
typedef T result_type;
typedef T type; typedef T type;
const T& operator()(const T& x) const const T& operator()(const T& x) const
{ return x; } { return x; }

View File

@@ -30,8 +30,6 @@
#include <boost/detail/no_exceptions_support.hpp> #include <boost/detail/no_exceptions_support.hpp>
#include <boost/assert.hpp> #include <boost/assert.hpp>
#include <cstddef> #include <cstddef>
#include <functional> //std::unary_function
namespace boost { namespace boost {
namespace container { namespace container {
@@ -252,8 +250,10 @@ class private_node_pool_impl
}; };
struct is_between struct is_between
: std::unary_function<typename free_nodes_t::value_type, bool>
{ {
typedef typename free_nodes_t::value_type argument_type;
typedef bool result_type;
is_between(const void *addr, std::size_t size) is_between(const void *addr, std::size_t size)
: beg_(static_cast<const char *>(addr)), end_(beg_+size) : beg_(static_cast<const char *>(addr)), end_(beg_+size)
{} {}

View File

@@ -492,19 +492,22 @@ class basic_string
template <class Tr> template <class Tr>
struct Eq_traits struct Eq_traits
: public std::binary_function<typename Tr::char_type,
typename Tr::char_type,
bool>
{ {
bool operator()(const typename Tr::char_type& x, //Compatibility with std::binary_function
const typename Tr::char_type& y) const typedef typename Tr::char_type first_argument_type;
typedef typename Tr::char_type second_argument_type;
typedef bool result_type;
bool operator()(const first_argument_type& x, const second_argument_type& y) const
{ return Tr::eq(x, y); } { return Tr::eq(x, y); }
}; };
template <class Tr> template <class Tr>
struct Not_within_traits struct Not_within_traits
: public std::unary_function<typename Tr::char_type, bool>
{ {
typedef typename Tr::char_type argument_type;
typedef bool result_type;
typedef const typename Tr::char_type* Pointer; typedef const typename Tr::char_type* Pointer;
const Pointer m_first; const Pointer m_first;
const Pointer m_last; const Pointer m_last;

View File

@@ -352,7 +352,7 @@ struct vector_alloc_holder
size_type next_capacity(size_type additional_objects) const size_type next_capacity(size_type additional_objects) const
{ {
return next_capacity_calculator return next_capacity_calculator
<size_type, /*NextCapacityDouble*/NextCapacity60Percent>:: <size_type, NextCapacityDouble/*NextCapacity60Percent*/>::
get( allocator_traits_type::max_size(this->alloc()) get( allocator_traits_type::max_size(this->alloc())
, this->m_capacity, additional_objects ); , this->m_capacity, additional_objects );
} }

View File

@@ -61,3 +61,5 @@ Add hash for containers
Add std:: hashing support Add std:: hashing support
Fix trivial destructor after move and other optimizing traits Fix trivial destructor after move and other optimizing traits
Implement n3586, "Splicing Maps and Sets" (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3586.pdf)

View File

@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="bench_flat_multiset"
ProjectGUID="{E5C01323-3F2C-D074-F4A9-D16B31CC275B}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="../../Bin/Win32/Debug"
IntermediateDirectory="Debug/bench_flat_multiset"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="TRUE"
ExceptionHandling="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="FALSE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/bench_flat_multiset_d.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../../stage/lib"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/bench_flat_multiset.pdb"
SubSystem="1"
TargetMachine="1"
FixedBaseAddress="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="../../Bin/Win32/Release"
IntermediateDirectory="Release/bench_flat_multiset"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../../.."
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="FALSE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/bench_flat_multiset.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../../stage/lib"
GenerateDebugInformation="TRUE"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{CF7232AE-72A6-3417-8ABF-5418BA30DA7A}">
<File
RelativePath="..\..\bench\bench_flat_multiset.cpp">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="bench_flat_set"
ProjectGUID="{5C2C01E3-DE40-F4A9-63F3-D3C316B327AB}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="../../Bin/Win32/Debug"
IntermediateDirectory="Debug/bench_flat_set"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="TRUE"
ExceptionHandling="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="FALSE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/bench_flat_set_d.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../../stage/lib"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/bench_flat_set.pdb"
SubSystem="1"
TargetMachine="1"
FixedBaseAddress="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="../../Bin/Win32/Release"
IntermediateDirectory="Release/bench_flat_set"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../../.."
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="FALSE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/bench_flat_set.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../../stage/lib"
GenerateDebugInformation="TRUE"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4CF723AF-2A67-C8AB-3114-5401A7A8BA3D}">
<File
RelativePath="..\..\bench\bench_flat_set.cpp">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="bench_set_alloc_v2"
ProjectGUID="{5C2D1813-24CE-A826-4FE5-5732251A3FAF}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="../../Bin/Win32/Debug"
IntermediateDirectory="Debug/bench_set_alloc_v2"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="TRUE"
ExceptionHandling="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="FALSE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/bench_set_alloc_v2_d.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../../stage/lib"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/bench_set_alloc_v2.pdb"
SubSystem="1"
TargetMachine="1"
FixedBaseAddress="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="../../Bin/Win32/Release"
IntermediateDirectory="Release/bench_set_alloc_v2"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../../.."
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="FALSE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/bench_set_alloc_v2.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../../stage/lib"
GenerateDebugInformation="TRUE"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4B737ACF-06A6-1243-CC8A-3D7D42A02A3F}">
<File
RelativePath="..\..\bench\bench_set_alloc_v2.cpp">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="bench_set_avl"
ProjectGUID="{5E1C1C23-26A9-AC4E-1FE5-C733DA52712B}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="../../Bin/Win32/Debug"
IntermediateDirectory="Debug/bench_set_avl"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="TRUE"
ExceptionHandling="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="FALSE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/bench_set_avl_d.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../../stage/lib"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/bench_set_avl.pdb"
SubSystem="1"
TargetMachine="1"
FixedBaseAddress="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="../../Bin/Win32/Release"
IntermediateDirectory="Release/bench_set_avl"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../../.."
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="FALSE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/bench_set_avl.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../../stage/lib"
GenerateDebugInformation="TRUE"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4B737ACF-06A6-1243-CC8A-3DA06A3FD42F}">
<File
RelativePath="..\..\bench\bench_set_avl.cpp">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="bench_set_multi"
ProjectGUID="{51C1C2E3-EA24-6A29-4FE5-D5C53C32271B}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="../../Bin/Win32/Debug"
IntermediateDirectory="Debug/bench_set_multi"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="TRUE"
ExceptionHandling="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="FALSE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/bench_set_multi_d.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../../stage/lib"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/bench_set_multi.pdb"
SubSystem="1"
TargetMachine="1"
FixedBaseAddress="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="../../Bin/Win32/Release"
IntermediateDirectory="Release/bench_set_multi"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../../.."
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="FALSE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/bench_set_multi.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../../stage/lib"
GenerateDebugInformation="TRUE"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4B737ACF-06A6-1243-CC8A-3D7D42A02A3F}">
<File
RelativePath="..\..\bench\bench_set_multi.cpp">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="bench_set_sg"
ProjectGUID="{51C2C0E3-6A93-4F4E-4DE1-D25273C32B3B}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="../../Bin/Win32/Debug"
IntermediateDirectory="Debug/bench_set_sg"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="TRUE"
ExceptionHandling="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="FALSE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/bench_set_sg_d.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../../stage/lib"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/bench_set_sg.pdb"
SubSystem="1"
TargetMachine="1"
FixedBaseAddress="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="../../Bin/Win32/Release"
IntermediateDirectory="Release/bench_set_sg"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../../.."
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="FALSE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/bench_set_sg.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../../stage/lib"
GenerateDebugInformation="TRUE"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{47ACF72F-3141-2A66-C8AB-5A3D42A9278A}">
<File
RelativePath="..\..\bench\bench_set_sg.cpp">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="bench_set_sp"
ProjectGUID="{5C2C01E3-4E4F-6A93-4DE1-D5273C316BBB}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="../../Bin/Win32/Debug"
IntermediateDirectory="Debug/bench_set_sp"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../.."
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="TRUE"
ExceptionHandling="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="FALSE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/bench_set_sp_d.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../../stage/lib"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/bench_set_sp.pdb"
SubSystem="1"
TargetMachine="1"
FixedBaseAddress="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="../../Bin/Win32/Release"
IntermediateDirectory="Release/bench_set_sp"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="../../../.."
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
TreatWChar_tAsBuiltInType="TRUE"
ForceConformanceInForLoopScope="FALSE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/bench_set_sp.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../../../../stage/lib"
GenerateDebugInformation="TRUE"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{47ACF72F-A626-1431-C8AB-54A3D21A9C8E}">
<File
RelativePath="..\..\bench\bench_set_sp.cpp">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -139,6 +139,34 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_extended_allocators", "
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bench_set_avl", "bench_set_avl.vcproj", "{5E1C1C23-26A9-AC4E-1FE5-C733DA52712B}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bench_set_multi", "bench_set_multi.vcproj", "{51E1C2C3-26A9-24FE-24DE-DB271C32332B}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bench_set_sg", "bench_set_sg.vcproj", "{51C2C0E3-6A93-4F4E-4DE1-D25273C32B3B}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bench_set_sp", "bench_set_sp.vcproj", "{5C2C01E3-4E4F-6A93-4DE1-D5273C316BBB}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bench_flat_set", "bench_flat_set.vcproj", "{5C2C01E3-DE40-F4A9-63F3-D3C316B327AB}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bench_flat_multiset", "bench_flat_multiset.vcproj", "{E5C01323-3F2C-D074-F4A9-D16B31CC275B}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bench_set_alloc_v2", "bench_set_alloc_v2.vcproj", "{5C2D1813-24CE-A826-4FE5-5732251A3FAF}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global Global
GlobalSection(SolutionConfiguration) = preSolution GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug Debug = Debug
@@ -287,6 +315,34 @@ Global
{5CE11C83-FA84-295A-4FA2-D7921A0BAB02}.Debug.Build.0 = Debug|Win32 {5CE11C83-FA84-295A-4FA2-D7921A0BAB02}.Debug.Build.0 = Debug|Win32
{5CE11C83-FA84-295A-4FA2-D7921A0BAB02}.Release.ActiveCfg = Release|Win32 {5CE11C83-FA84-295A-4FA2-D7921A0BAB02}.Release.ActiveCfg = Release|Win32
{5CE11C83-FA84-295A-4FA2-D7921A0BAB02}.Release.Build.0 = Release|Win32 {5CE11C83-FA84-295A-4FA2-D7921A0BAB02}.Release.Build.0 = Release|Win32
{5E1C1C23-26A9-AC4E-1FE5-C733DA52712B}.Debug.ActiveCfg = Debug|Win32
{5E1C1C23-26A9-AC4E-1FE5-C733DA52712B}.Debug.Build.0 = Debug|Win32
{5E1C1C23-26A9-AC4E-1FE5-C733DA52712B}.Release.ActiveCfg = Release|Win32
{5E1C1C23-26A9-AC4E-1FE5-C733DA52712B}.Release.Build.0 = Release|Win32
{51E1C2C3-26A9-24FE-24DE-DB271C32332B}.Debug.ActiveCfg = Debug|Win32
{51E1C2C3-26A9-24FE-24DE-DB271C32332B}.Debug.Build.0 = Debug|Win32
{51E1C2C3-26A9-24FE-24DE-DB271C32332B}.Release.ActiveCfg = Release|Win32
{51E1C2C3-26A9-24FE-24DE-DB271C32332B}.Release.Build.0 = Release|Win32
{51C2C0E3-6A93-4F4E-4DE1-D25273C32B3B}.Debug.ActiveCfg = Debug|Win32
{51C2C0E3-6A93-4F4E-4DE1-D25273C32B3B}.Debug.Build.0 = Debug|Win32
{51C2C0E3-6A93-4F4E-4DE1-D25273C32B3B}.Release.ActiveCfg = Release|Win32
{51C2C0E3-6A93-4F4E-4DE1-D25273C32B3B}.Release.Build.0 = Release|Win32
{5C2C01E3-4E4F-6A93-4DE1-D5273C316BBB}.Debug.ActiveCfg = Debug|Win32
{5C2C01E3-4E4F-6A93-4DE1-D5273C316BBB}.Debug.Build.0 = Debug|Win32
{5C2C01E3-4E4F-6A93-4DE1-D5273C316BBB}.Release.ActiveCfg = Release|Win32
{5C2C01E3-4E4F-6A93-4DE1-D5273C316BBB}.Release.Build.0 = Release|Win32
{5C2C01E3-DE40-F4A9-63F3-D3C316B327AB}.Debug.ActiveCfg = Debug|Win32
{5C2C01E3-DE40-F4A9-63F3-D3C316B327AB}.Debug.Build.0 = Debug|Win32
{5C2C01E3-DE40-F4A9-63F3-D3C316B327AB}.Release.ActiveCfg = Release|Win32
{5C2C01E3-DE40-F4A9-63F3-D3C316B327AB}.Release.Build.0 = Release|Win32
{E5C01323-3F2C-D074-F4A9-D16B31CC275B}.Debug.ActiveCfg = Debug|Win32
{E5C01323-3F2C-D074-F4A9-D16B31CC275B}.Debug.Build.0 = Debug|Win32
{E5C01323-3F2C-D074-F4A9-D16B31CC275B}.Release.ActiveCfg = Release|Win32
{E5C01323-3F2C-D074-F4A9-D16B31CC275B}.Release.Build.0 = Release|Win32
{5C2D1813-24CE-A826-4FE5-5732251A3FAF}.Debug.ActiveCfg = Debug|Win32
{5C2D1813-24CE-A826-4FE5-5732251A3FAF}.Debug.Build.0 = Debug|Win32
{5C2D1813-24CE-A826-4FE5-5732251A3FAF}.Release.ActiveCfg = Release|Win32
{5C2D1813-24CE-A826-4FE5-5732251A3FAF}.Release.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection EndGlobalSection

View File

@@ -20,8 +20,11 @@ namespace boost{
namespace container { namespace container {
namespace test{ namespace test{
struct PrintValues : public std::unary_function<int, void> struct PrintValues
{ {
typedef int argument_type;
typedef void result_type;
void operator() (int value) const void operator() (int value) const
{ {
std::cout << value << " "; std::cout << value << " ";