mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 03:17:15 +02:00
Add mulx variants to benchmarks
This commit is contained in:
@ -289,8 +289,11 @@ template<class K, class V> using std_unordered_map =
|
|||||||
template<class K, class V> using boost_unordered_map =
|
template<class K, class V> using boost_unordered_map =
|
||||||
boost::unordered_map<K, V, boost::hash<K>, std::equal_to<K>, allocator_for<K, V>>;
|
boost::unordered_map<K, V, boost::hash<K>, std::equal_to<K>, allocator_for<K, V>>;
|
||||||
|
|
||||||
template<class K, class V> using boost_unordered_flat_map =
|
template<class K, class V> using boost_unordered_flat_map_xmx =
|
||||||
boost::unordered_flat_map<K, V, boost::hash<K>, std::equal_to<K>, allocator_for<K, V>>;
|
boost::unordered_flat_map<K, V, boost::hash<K>, std::equal_to<K>, allocator_for<K, V>, boost::unordered::detail::foa::xmx_mix>;
|
||||||
|
|
||||||
|
template<class K, class V> using boost_unordered_flat_map_mulx =
|
||||||
|
boost::unordered_flat_map<K, V, boost::hash<K>, std::equal_to<K>, allocator_for<K, V>, boost::unordered::detail::foa::mulx_mix>;
|
||||||
|
|
||||||
#ifdef HAVE_ABSEIL
|
#ifdef HAVE_ABSEIL
|
||||||
|
|
||||||
@ -315,7 +318,8 @@ int main()
|
|||||||
|
|
||||||
test<std_unordered_map>( "std::unordered_map" );
|
test<std_unordered_map>( "std::unordered_map" );
|
||||||
test<boost_unordered_map>( "boost::unordered_map" );
|
test<boost_unordered_map>( "boost::unordered_map" );
|
||||||
test<boost_unordered_flat_map>( "boost::unordered_flat_map" );
|
test<boost_unordered_flat_map_xmx>( "boost::unordered_flat_map, xmx" );
|
||||||
|
test<boost_unordered_flat_map_mulx>( "boost::unordered_flat_map, mulx" );
|
||||||
|
|
||||||
#ifdef HAVE_ANKERL_UNORDERED_DENSE
|
#ifdef HAVE_ANKERL_UNORDERED_DENSE
|
||||||
|
|
||||||
@ -334,7 +338,7 @@ int main()
|
|||||||
|
|
||||||
for( auto const& x: times )
|
for( auto const& x: times )
|
||||||
{
|
{
|
||||||
std::cout << std::setw( 30 ) << ( x.label_ + ": " ) << std::setw( 5 ) << x.time_ << " ms, " << std::setw( 9 ) << x.bytes_ << " bytes in " << x.count_ << " allocations\n";
|
std::cout << std::setw( 33 ) << ( x.label_ + ": " ) << std::setw( 5 ) << x.time_ << " ms, " << std::setw( 9 ) << x.bytes_ << " bytes in " << x.count_ << " allocations\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,8 +289,11 @@ template<class K, class V> using std_unordered_map =
|
|||||||
template<class K, class V> using boost_unordered_map =
|
template<class K, class V> using boost_unordered_map =
|
||||||
boost::unordered_map<K, V, boost::hash<K>, std::equal_to<K>, allocator_for<K, V>>;
|
boost::unordered_map<K, V, boost::hash<K>, std::equal_to<K>, allocator_for<K, V>>;
|
||||||
|
|
||||||
template<class K, class V> using boost_unordered_flat_map =
|
template<class K, class V> using boost_unordered_flat_map_xmx =
|
||||||
boost::unordered_flat_map<K, V, boost::hash<K>, std::equal_to<K>, allocator_for<K, V>>;
|
boost::unordered_flat_map<K, V, boost::hash<K>, std::equal_to<K>, allocator_for<K, V>, boost::unordered::detail::foa::xmx_mix>;
|
||||||
|
|
||||||
|
template<class K, class V> using boost_unordered_flat_map_mulx =
|
||||||
|
boost::unordered_flat_map<K, V, boost::hash<K>, std::equal_to<K>, allocator_for<K, V>, boost::unordered::detail::foa::mulx_mix>;
|
||||||
|
|
||||||
#ifdef HAVE_ABSEIL
|
#ifdef HAVE_ABSEIL
|
||||||
|
|
||||||
@ -325,7 +328,8 @@ int main()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
test<boost_unordered_map>( "boost::unordered_map" );
|
test<boost_unordered_map>( "boost::unordered_map" );
|
||||||
test<boost_unordered_flat_map>( "boost::unordered_flat_map" );
|
test<boost_unordered_flat_map_xmx>( "boost::unordered_flat_map, xmx" );
|
||||||
|
test<boost_unordered_flat_map_mulx>( "boost::unordered_flat_map, mulx" );
|
||||||
|
|
||||||
#ifdef HAVE_ANKERL_UNORDERED_DENSE
|
#ifdef HAVE_ANKERL_UNORDERED_DENSE
|
||||||
|
|
||||||
@ -344,7 +348,7 @@ int main()
|
|||||||
|
|
||||||
for( auto const& x: times )
|
for( auto const& x: times )
|
||||||
{
|
{
|
||||||
std::cout << std::setw( 30 ) << ( x.label_ + ": " ) << std::setw( 5 ) << x.time_ << " ms, " << std::setw( 9 ) << x.bytes_ << " bytes in " << x.count_ << " allocations\n";
|
std::cout << std::setw( 33 ) << ( x.label_ + ": " ) << std::setw( 5 ) << x.time_ << " ms, " << std::setw( 9 ) << x.bytes_ << " bytes in " << x.count_ << " allocations\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,8 +181,11 @@ template<class K, class V> using std_unordered_map =
|
|||||||
template<class K, class V> using boost_unordered_map =
|
template<class K, class V> using boost_unordered_map =
|
||||||
boost::unordered_map<K, V, boost::hash<K>, std::equal_to<K>, allocator_for<K, V>>;
|
boost::unordered_map<K, V, boost::hash<K>, std::equal_to<K>, allocator_for<K, V>>;
|
||||||
|
|
||||||
template<class K, class V> using boost_unordered_flat_map =
|
template<class K, class V> using boost_unordered_flat_map_xmx =
|
||||||
boost::unordered_flat_map<K, V, boost::hash<K>, std::equal_to<K>, allocator_for<K, V>>;
|
boost::unordered_flat_map<K, V, boost::hash<K>, std::equal_to<K>, allocator_for<K, V>, boost::unordered::detail::foa::xmx_mix>;
|
||||||
|
|
||||||
|
template<class K, class V> using boost_unordered_flat_map_mulx =
|
||||||
|
boost::unordered_flat_map<K, V, boost::hash<K>, std::equal_to<K>, allocator_for<K, V>, boost::unordered::detail::foa::mulx_mix>;
|
||||||
|
|
||||||
#ifdef HAVE_ABSEIL
|
#ifdef HAVE_ABSEIL
|
||||||
|
|
||||||
@ -207,7 +210,8 @@ int main()
|
|||||||
|
|
||||||
test<std_unordered_map>( "std::unordered_map" );
|
test<std_unordered_map>( "std::unordered_map" );
|
||||||
test<boost_unordered_map>( "boost::unordered_map" );
|
test<boost_unordered_map>( "boost::unordered_map" );
|
||||||
test<boost_unordered_flat_map>( "boost::unordered_flat_map" );
|
test<boost_unordered_flat_map_xmx>( "boost::unordered_flat_map, xmx" );
|
||||||
|
test<boost_unordered_flat_map_mulx>( "boost::unordered_flat_map, mulx" );
|
||||||
|
|
||||||
#ifdef HAVE_ANKERL_UNORDERED_DENSE
|
#ifdef HAVE_ANKERL_UNORDERED_DENSE
|
||||||
|
|
||||||
@ -226,7 +230,7 @@ int main()
|
|||||||
|
|
||||||
for( auto const& x: times )
|
for( auto const& x: times )
|
||||||
{
|
{
|
||||||
std::cout << std::setw( 30 ) << ( x.label_ + ": " ) << std::setw( 5 ) << x.time_ << " ms, " << std::setw( 9 ) << x.bytes_ << " bytes in " << x.count_ << " allocations\n";
|
std::cout << std::setw( 33 ) << ( x.label_ + ": " ) << std::setw( 5 ) << x.time_ << " ms, " << std::setw( 9 ) << x.bytes_ << " bytes in " << x.count_ << " allocations\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user