bench_set.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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 vs std::set
  19. launch_tests< set<int> , std::set<int> >
  20. ("set<int>", "std::set<int>");
  21. launch_tests< set<string> , std::set<string> >
  22. ("set<string>", "std::set<string>");
  23. //set(sizeopt) vs set(!sizeopt)
  24. launch_tests< set<int>, set<int, std::less<int>, std::allocator<int>, tree_assoc_options< optimize_size<false> >::type > >
  25. ("set<int>(sizeopt=true)", "set<int>(sizeopt=false)");
  26. launch_tests< set<string>, set<string, std::less<string>, std::allocator<string>, tree_assoc_options< optimize_size<false> >::type > >
  27. ("set<string>(sizeopt=true)", "set<string>(sizeopt=false)");
  28. return 0;
  29. }