From ea715970532291f49cf1ac5c6e7002c83b7d1ed0 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 25 Nov 2022 00:52:31 +0200 Subject: [PATCH] Remove multi_index from benchmarks --- benchmark/string.cpp | 35 ----------------------------------- benchmark/string_view.cpp | 35 ----------------------------------- benchmark/uint32.cpp | 22 ---------------------- benchmark/uint64.cpp | 22 ---------------------- benchmark/uuid.cpp | 22 ---------------------- 5 files changed, 136 deletions(-) diff --git a/benchmark/string.cpp b/benchmark/string.cpp index 19ab4eb8..24ceb60a 100644 --- a/benchmark/string.cpp +++ b/benchmark/string.cpp @@ -6,9 +6,6 @@ #include #include -#include -#include -#include #include #include #ifdef HAVE_ABSEIL @@ -267,24 +264,6 @@ template class Map> BOOST_NOINLINE void test( char const* lab times.push_back( rec ); } -// multi_index emulation of unordered_map - -template struct pair -{ - K first; - mutable V second; -}; - -using namespace boost::multi_index; - -template using multi_index_map = multi_index_container< - pair, - indexed_by< - hashed_unique< member, K, &pair::first> > - >, - ::allocator< pair > ->; - // aliases using the counting allocator template using allocator_for = ::allocator< std::pair >; @@ -384,14 +363,6 @@ template using boost_unordered_map_fnv1a = template using boost_unordered_flat_map_fnv1a = boost::unordered_flat_map, allocator_for>; -template using multi_index_map_fnv1a = multi_index_container< - pair, - indexed_by< - hashed_unique< member, K, &pair::first>, fnv1a_hash > - >, - ::allocator< pair > ->; - #ifdef HAVE_ABSEIL template using absl_node_hash_map_fnv1a = @@ -428,12 +399,9 @@ int main() { init_indices(); -#if 1 - test( "std::unordered_map" ); test( "boost::unordered_map" ); test( "boost::unordered_flat_map" ); - test( "multi_index_map" ); #ifdef HAVE_ABSEIL @@ -454,14 +422,11 @@ int main() test( "tsl::robin_map" ); test( "tsl::robin_pg_map" ); -#endif - #endif test( "std::unordered_map, FNV-1a" ); test( "boost::unordered_map, FNV-1a" ); test( "boost::unordered_flat_map, FNV-1a" ); - test( "multi_index_map, FNV-1a" ); #ifdef HAVE_ABSEIL diff --git a/benchmark/string_view.cpp b/benchmark/string_view.cpp index a7236782..728884d1 100644 --- a/benchmark/string_view.cpp +++ b/benchmark/string_view.cpp @@ -6,9 +6,6 @@ #include #include -#include -#include -#include #include #include #ifdef HAVE_ABSEIL @@ -268,24 +265,6 @@ template class Map> BOOST_NOINLINE void test( char const* lab times.push_back( rec ); } -// multi_index emulation of unordered_map - -template struct pair -{ - K first; - mutable V second; -}; - -using namespace boost::multi_index; - -template using multi_index_map = multi_index_container< - pair, - indexed_by< - hashed_unique< member, K, &pair::first> > - >, - ::allocator< pair > ->; - // aliases using the counting allocator template using allocator_for = ::allocator< std::pair >; @@ -385,14 +364,6 @@ template using boost_unordered_map_fnv1a = template using boost_unordered_flat_map_fnv1a = boost::unordered_flat_map, allocator_for>; -template using multi_index_map_fnv1a = multi_index_container< - pair, - indexed_by< - hashed_unique< member, K, &pair::first>, fnv1a_hash > - >, - ::allocator< pair > ->; - #ifdef HAVE_ABSEIL template using absl_node_hash_map_fnv1a = @@ -429,12 +400,9 @@ int main() { init_indices(); -#if 1 - test( "std::unordered_map" ); test( "boost::unordered_map" ); test( "boost::unordered_flat_map" ); - test( "multi_index_map" ); #ifdef HAVE_ABSEIL @@ -455,14 +423,11 @@ int main() test( "tsl::robin_map" ); test( "tsl::robin_pg_map" ); -#endif - #endif test( "std::unordered_map, FNV-1a" ); test( "boost::unordered_map, FNV-1a" ); test( "boost::unordered_flat_map, FNV-1a" ); - test( "multi_index_map, FNV-1a" ); #ifdef HAVE_ABSEIL diff --git a/benchmark/uint32.cpp b/benchmark/uint32.cpp index 986f9669..ff7ac031 100644 --- a/benchmark/uint32.cpp +++ b/benchmark/uint32.cpp @@ -6,9 +6,6 @@ #include #include -#include -#include -#include #include #include #include @@ -284,24 +281,6 @@ template class Map> BOOST_NOINLINE void test( char const* lab times.push_back( rec ); } -// multi_index emulation of unordered_map - -template struct pair -{ - K first; - mutable V second; -}; - -using namespace boost::multi_index; - -template using multi_index_map = multi_index_container< - pair, - indexed_by< - hashed_unique< member, K, &pair::first> > - >, - ::allocator< pair > ->; - // aliases using the counting allocator template using allocator_for = ::allocator< std::pair >; @@ -352,7 +331,6 @@ int main() test( "std::unordered_map" ); test( "boost::unordered_map" ); test( "boost::unordered_flat_map" ); - test( "multi_index_map" ); #ifdef HAVE_ABSEIL diff --git a/benchmark/uint64.cpp b/benchmark/uint64.cpp index e8b5161d..e7721065 100644 --- a/benchmark/uint64.cpp +++ b/benchmark/uint64.cpp @@ -6,9 +6,6 @@ #include #include -#include -#include -#include #include #include #include @@ -284,24 +281,6 @@ template class Map> BOOST_NOINLINE void test( char const* lab times.push_back( rec ); } -// multi_index emulation of unordered_map - -template struct pair -{ - K first; - mutable V second; -}; - -using namespace boost::multi_index; - -template using multi_index_map = multi_index_container< - pair, - indexed_by< - hashed_unique< member, K, &pair::first> > - >, - ::allocator< pair > ->; - // aliases using the counting allocator template using allocator_for = ::allocator< std::pair >; @@ -352,7 +331,6 @@ int main() test( "std::unordered_map" ); test( "boost::unordered_map" ); test( "boost::unordered_flat_map" ); - test( "multi_index_map" ); #ifdef HAVE_ABSEIL diff --git a/benchmark/uuid.cpp b/benchmark/uuid.cpp index 494b1317..a1338781 100644 --- a/benchmark/uuid.cpp +++ b/benchmark/uuid.cpp @@ -6,9 +6,6 @@ #include #include -#include -#include -#include #include #include #include @@ -329,24 +326,6 @@ template class Map> BOOST_NOINLINE void test( char const* lab times.push_back( rec ); } -// multi_index emulation of unordered_map - -template struct pair -{ - K first; - mutable V second; -}; - -using namespace boost::multi_index; - -template using multi_index_map = multi_index_container< - pair, - indexed_by< - hashed_unique< member, K, &pair::first> > - >, - ::allocator< pair > ->; - // aliases using the counting allocator template using allocator_for = ::allocator< std::pair >; @@ -377,7 +356,6 @@ int main() test( "std::unordered_map" ); test( "boost::unordered_map" ); test( "boost::unordered_flat_map" ); - test( "multi_index_map" ); #ifdef HAVE_ABSEIL