bench_set_avl.cpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (C) Copyright Ion Gaztanaga 2013-2013. Distributed under the Boost
  4. // Software License, Version 1.0. (See accompanying file
  5. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // See http://www.boost.org/libs/container for documentation.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. #include "boost/container/set.hpp"
  11. #include <set>
  12. #include "bench_set.hpp"
  13. int main()
  14. {
  15. using namespace boost::container;
  16. fill_range_ints();
  17. fill_range_strings();
  18. //set(AVL) vs set(RB)
  19. launch_tests< set<int, std::less<int>, std::allocator<int>, tree_assoc_options< tree_type<avl_tree> >::type >, set<int> >
  20. ("set<int>(AVL)", "set<int>(RB)");
  21. launch_tests< set<string, std::less<string>, std::allocator<string>, tree_assoc_options< tree_type<avl_tree> >::type >, set<string> >
  22. ("set<string>(AVL)", "set<string>(RB)");
  23. //set(AVL,sizeopt) vs set(AVL,!sizeopt)
  24. launch_tests< set<int, std::less<int>, std::allocator<int>, tree_assoc_options< tree_type<avl_tree> >::type >
  25. , set<int, std::less<int>, std::allocator<int>, tree_assoc_options< tree_type<avl_tree>, optimize_size<false> >::type > >
  26. ("set<int>(AVL,sizeopt=true)", "set<int>(AVL,sizeopt=false)");
  27. launch_tests< set<string, std::less<string>, std::allocator<string>, tree_assoc_options< tree_type<avl_tree> >::type >
  28. , set<string, std::less<string>, std::allocator<string>, tree_assoc_options< tree_type<avl_tree>, optimize_size<false> >::type > >
  29. ("set<string>(AVL,sizeopt=true)", "set<string>(AVL,sizeopt=false)");
  30. return 0;
  31. }