From fadb686bc5462a031057d1730ae0cee8e0ae0bfc Mon Sep 17 00:00:00 2001 From: joaquintides Date: Thu, 23 Feb 2023 20:17:01 +0100 Subject: [PATCH] added boost::unordered_node_map to benchmarks --- benchmark/string.cpp | 10 ++++++++++ benchmark/string_view.cpp | 10 ++++++++++ benchmark/uint32.cpp | 6 ++++++ benchmark/uint64.cpp | 6 ++++++ benchmark/uuid.cpp | 6 ++++++ benchmark/word_count.cpp | 10 ++++++++++ benchmark/word_size.cpp | 6 ++++++ 7 files changed, 54 insertions(+) diff --git a/benchmark/string.cpp b/benchmark/string.cpp index a48c9a66..5f4cbc13 100644 --- a/benchmark/string.cpp +++ b/benchmark/string.cpp @@ -1,4 +1,5 @@ // Copyright 2021 Peter Dimov. +// Copyright 2023 Joaquin M Lopez Munoz. // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt @@ -6,6 +7,7 @@ #define _SILENCE_CXX20_CISO646_REMOVED_WARNING #include +#include #include #include #include @@ -272,6 +274,9 @@ template using std_unordered_map = template using boost_unordered_map = boost::unordered_map, std::equal_to, allocator_for>; +template using boost_unordered_node_map = + boost::unordered_node_map, std::equal_to, allocator_for>; + template using boost_unordered_flat_map = boost::unordered_flat_map, std::equal_to, allocator_for>; @@ -345,6 +350,9 @@ std::unordered_map, allocator_for>; template using boost_unordered_map_fnv1a = boost::unordered_map, allocator_for>; +template using boost_unordered_node_map_fnv1a = + boost::unordered_node_map, allocator_for>; + template using boost_unordered_flat_map_fnv1a = boost::unordered_flat_map, allocator_for>; @@ -373,6 +381,7 @@ int main() test( "std::unordered_map" ); test( "boost::unordered_map" ); + test( "boost::unordered_node_map" ); test( "boost::unordered_flat_map" ); #ifdef HAVE_ANKERL_UNORDERED_DENSE @@ -390,6 +399,7 @@ int main() test( "std::unordered_map, FNV-1a" ); test( "boost::unordered_map, FNV-1a" ); + test( "boost::unordered_node_map, FNV-1a" ); test( "boost::unordered_flat_map, FNV-1a" ); #ifdef HAVE_ANKERL_UNORDERED_DENSE diff --git a/benchmark/string_view.cpp b/benchmark/string_view.cpp index 065437bb..2b1583be 100644 --- a/benchmark/string_view.cpp +++ b/benchmark/string_view.cpp @@ -1,4 +1,5 @@ // Copyright 2021 Peter Dimov. +// Copyright 2023 Joaquin M Lopez Munoz. // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt @@ -6,6 +7,7 @@ #define _SILENCE_CXX20_CISO646_REMOVED_WARNING #include +#include #include #include #include @@ -273,6 +275,9 @@ template using std_unordered_map = template using boost_unordered_map = boost::unordered_map, std::equal_to, allocator_for>; +template using boost_unordered_node_map = + boost::unordered_node_map, std::equal_to, allocator_for>; + template using boost_unordered_flat_map = boost::unordered_flat_map, std::equal_to, allocator_for>; @@ -346,6 +351,9 @@ std::unordered_map, allocator_for>; template using boost_unordered_map_fnv1a = boost::unordered_map, allocator_for>; +template using boost_unordered_node_map_fnv1a = + boost::unordered_node_map, allocator_for>; + template using boost_unordered_flat_map_fnv1a = boost::unordered_flat_map, allocator_for>; @@ -374,6 +382,7 @@ int main() test( "std::unordered_map" ); test( "boost::unordered_map" ); + test( "boost::unordered_node_map" ); test( "boost::unordered_flat_map" ); #ifdef HAVE_ANKERL_UNORDERED_DENSE @@ -391,6 +400,7 @@ int main() test( "std::unordered_map, FNV-1a" ); test( "boost::unordered_map, FNV-1a" ); + test( "boost::unordered_node_map, FNV-1a" ); test( "boost::unordered_flat_map, FNV-1a" ); #ifdef HAVE_ANKERL_UNORDERED_DENSE diff --git a/benchmark/uint32.cpp b/benchmark/uint32.cpp index 5b37de52..7b8edd25 100644 --- a/benchmark/uint32.cpp +++ b/benchmark/uint32.cpp @@ -1,4 +1,5 @@ // Copyright 2021 Peter Dimov. +// Copyright 2023 Joaquin M Lopez Munoz. // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt @@ -6,6 +7,7 @@ #define _SILENCE_CXX20_CISO646_REMOVED_WARNING #include +#include #include #include #include @@ -289,6 +291,9 @@ template using std_unordered_map = template using boost_unordered_map = boost::unordered_map, std::equal_to, allocator_for>; +template using boost_unordered_node_map = + boost::unordered_node_map, std::equal_to, allocator_for>; + template using boost_unordered_flat_map = boost::unordered_flat_map, std::equal_to, allocator_for>; @@ -315,6 +320,7 @@ int main() test( "std::unordered_map" ); test( "boost::unordered_map" ); + test( "boost::unordered_node_map" ); test( "boost::unordered_flat_map" ); #ifdef HAVE_ANKERL_UNORDERED_DENSE diff --git a/benchmark/uint64.cpp b/benchmark/uint64.cpp index 94be050a..3dfa5d5f 100644 --- a/benchmark/uint64.cpp +++ b/benchmark/uint64.cpp @@ -1,4 +1,5 @@ // Copyright 2021 Peter Dimov. +// Copyright 2023 Joaquin M Lopez Munoz. // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt @@ -6,6 +7,7 @@ #define _SILENCE_CXX20_CISO646_REMOVED_WARNING #include +#include #include #include #include @@ -289,6 +291,9 @@ template using std_unordered_map = template using boost_unordered_map = boost::unordered_map, std::equal_to, allocator_for>; +template using boost_unordered_node_map = + boost::unordered_node_map, std::equal_to, allocator_for>; + template using boost_unordered_flat_map = boost::unordered_flat_map, std::equal_to, allocator_for>; @@ -325,6 +330,7 @@ int main() #endif test( "boost::unordered_map" ); + test( "boost::unordered_node_map" ); test( "boost::unordered_flat_map" ); #ifdef HAVE_ANKERL_UNORDERED_DENSE diff --git a/benchmark/uuid.cpp b/benchmark/uuid.cpp index 3363bee0..6b4f8bbd 100644 --- a/benchmark/uuid.cpp +++ b/benchmark/uuid.cpp @@ -1,4 +1,5 @@ // Copyright 2021, 2022 Peter Dimov. +// Copyright 2023 Joaquin M Lopez Munoz. // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt @@ -6,6 +7,7 @@ #define _SILENCE_CXX20_CISO646_REMOVED_WARNING #include +#include #include #include #include @@ -340,6 +342,9 @@ template using std_unordered_map = template using boost_unordered_map = boost::unordered_map, std::equal_to, allocator_for>; +template using boost_unordered_node_map = + boost::unordered_node_map, std::equal_to, allocator_for>; + template using boost_unordered_flat_map = boost::unordered_flat_map, std::equal_to, allocator_for>; @@ -366,6 +371,7 @@ int main() test( "std::unordered_map" ); test( "boost::unordered_map" ); + test( "boost::unordered_node_map" ); test( "boost::unordered_flat_map" ); #ifdef HAVE_ANKERL_UNORDERED_DENSE diff --git a/benchmark/word_count.cpp b/benchmark/word_count.cpp index 812b3419..f8f7d6ea 100644 --- a/benchmark/word_count.cpp +++ b/benchmark/word_count.cpp @@ -1,4 +1,5 @@ // Copyright 2021, 2022 Peter Dimov. +// Copyright 2023 Joaquin M Lopez Munoz. // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt @@ -6,6 +7,7 @@ #define _SILENCE_CXX20_CISO646_REMOVED_WARNING #include +#include #include #include #ifdef HAVE_ABSEIL @@ -227,6 +229,9 @@ template using std_unordered_map = template using boost_unordered_map = boost::unordered_map, std::equal_to, allocator_for>; +template using boost_unordered_node_map = + boost::unordered_node_map, std::equal_to, allocator_for>; + template using boost_unordered_flat_map = boost::unordered_flat_map, std::equal_to, allocator_for>; @@ -300,6 +305,9 @@ std::unordered_map, allocator_for>; template using boost_unordered_map_fnv1a = boost::unordered_map, allocator_for>; +template using boost_unordered_node_map_fnv1a = + boost::unordered_node_map, allocator_for>; + template using boost_unordered_flat_map_fnv1a = boost::unordered_flat_map, allocator_for>; @@ -328,6 +336,7 @@ int main() test( "std::unordered_map" ); test( "boost::unordered_map" ); + test( "boost::unordered_node_map" ); test( "boost::unordered_flat_map" ); #ifdef HAVE_ANKERL_UNORDERED_DENSE @@ -345,6 +354,7 @@ int main() test( "std::unordered_map, FNV-1a" ); test( "boost::unordered_map, FNV-1a" ); + test( "boost::unordered_node_map, FNV-1a" ); test( "boost::unordered_flat_map, FNV-1a" ); #ifdef HAVE_ANKERL_UNORDERED_DENSE diff --git a/benchmark/word_size.cpp b/benchmark/word_size.cpp index f7412192..ca699f35 100644 --- a/benchmark/word_size.cpp +++ b/benchmark/word_size.cpp @@ -1,4 +1,5 @@ // Copyright 2021, 2022 Peter Dimov. +// Copyright 2023 Joaquin M Lopez Munoz. // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt @@ -6,6 +7,7 @@ #define _SILENCE_CXX20_CISO646_REMOVED_WARNING #include +#include #include #include #ifdef HAVE_ABSEIL @@ -181,6 +183,9 @@ template using std_unordered_map = template using boost_unordered_map = boost::unordered_map, std::equal_to, allocator_for>; +template using boost_unordered_node_map = + boost::unordered_node_map, std::equal_to, allocator_for>; + template using boost_unordered_flat_map = boost::unordered_flat_map, std::equal_to, allocator_for>; @@ -207,6 +212,7 @@ int main() test( "std::unordered_map" ); test( "boost::unordered_map" ); + test( "boost::unordered_node_map" ); test( "boost::unordered_flat_map" ); #ifdef HAVE_ANKERL_UNORDERED_DENSE