Remove old_boost_hash from benchmarks

This commit is contained in:
Peter Dimov
2022-11-25 20:27:20 +02:00
parent ce166d1030
commit ffadafa0c1
2 changed files with 0 additions and 50 deletions

View File

@@ -170,28 +170,6 @@ template<> struct fnv1a_hash_impl<64>
struct fnv1a_hash: fnv1a_hash_impl< std::numeric_limits<std::size_t>::digits > {}; struct fnv1a_hash: fnv1a_hash_impl< std::numeric_limits<std::size_t>::digits > {};
// old_boost_hash
class old_boost_hash
{
public:
std::size_t operator()( std::string const& st ) const BOOST_NOEXCEPT
{
char const * p = st.data();
std::size_t n = st.size();
std::size_t h = 0;
for( std::size_t i = 0; i < n; ++i )
{
h ^= static_cast<unsigned char>( p[i] ) + 0x9e3779b9 + ( h << 6 ) + ( h >> 2 );
}
return h;
}
};
// mulxp_hash // mulxp_hash
#ifdef HAVE_MULXP_HASH #ifdef HAVE_MULXP_HASH
@@ -387,7 +365,6 @@ int main()
test_hash_speed<mul31_hash>( N * 16, v ); test_hash_speed<mul31_hash>( N * 16, v );
test_hash_speed<mul31_unrolled_hash>( N * 16, v ); test_hash_speed<mul31_unrolled_hash>( N * 16, v );
test_hash_speed<fnv1a_hash>( N * 16, v ); test_hash_speed<fnv1a_hash>( N * 16, v );
test_hash_speed<old_boost_hash>( N * 16, v );
test_hash_speed<boost::hash<std::string> >( N * 16, v ); test_hash_speed<boost::hash<std::string> >( N * 16, v );
test_hash_speed<std::hash<std::string> >( N * 16, v ); test_hash_speed<std::hash<std::string> >( N * 16, v );
#ifdef HAVE_ABSEIL #ifdef HAVE_ABSEIL
@@ -421,7 +398,6 @@ int main()
test_hash_collision<mul31_hash>( N * 16, v, n ); test_hash_collision<mul31_hash>( N * 16, v, n );
test_hash_collision<mul31_unrolled_hash>( N * 16, v, n ); test_hash_collision<mul31_unrolled_hash>( N * 16, v, n );
test_hash_collision<fnv1a_hash>( N * 16, v, n ); test_hash_collision<fnv1a_hash>( N * 16, v, n );
test_hash_collision<old_boost_hash>( N * 16, v, n );
test_hash_collision<boost::hash<std::string> >( N * 16, v, n ); test_hash_collision<boost::hash<std::string> >( N * 16, v, n );
test_hash_collision<std::hash<std::string> >( N * 16, v, n ); test_hash_collision<std::hash<std::string> >( N * 16, v, n );
#ifdef HAVE_ABSEIL #ifdef HAVE_ABSEIL
@@ -444,7 +420,6 @@ int main()
test_container_speed<K, mul31_hash>( N, v ); test_container_speed<K, mul31_hash>( N, v );
test_container_speed<K, mul31_unrolled_hash>( N, v ); test_container_speed<K, mul31_unrolled_hash>( N, v );
test_container_speed<K, fnv1a_hash>( N, v ); test_container_speed<K, fnv1a_hash>( N, v );
test_container_speed<K, old_boost_hash>( N, v );
test_container_speed<K, boost::hash<std::string> >( N, v ); test_container_speed<K, boost::hash<std::string> >( N, v );
test_container_speed<K, std::hash<std::string> >( N, v ); test_container_speed<K, std::hash<std::string> >( N, v );
#ifdef HAVE_ABSEIL #ifdef HAVE_ABSEIL

View File

@@ -364,30 +364,6 @@ struct fnv1a_hash: fnv1a_hash_impl< std::numeric_limits<std::size_t>::digits >
using is_avalanching = void; using is_avalanching = void;
}; };
// old_boost_hash
class old_boost_hash
{
public:
// not avalanching
std::size_t operator()( std::string const& st ) const BOOST_NOEXCEPT
{
char const * p = st.data();
std::size_t n = st.size();
std::size_t h = 0;
for( std::size_t i = 0; i < n; ++i )
{
h ^= static_cast<unsigned char>( p[i] ) + 0x9e3779b9 + ( h << 6 ) + ( h >> 2 );
}
return h;
}
};
// std_hash // std_hash
struct std_hash: std::hash<std::string> struct std_hash: std::hash<std::string>
@@ -463,7 +439,6 @@ int main()
test< mul31_hash >( "mul31_hash" ); test< mul31_hash >( "mul31_hash" );
test< mul31_unrolled_hash >( "mul31_unrolled_hash" ); test< mul31_unrolled_hash >( "mul31_unrolled_hash" );
test< fnv1a_hash >( "fnv1a_hash" ); test< fnv1a_hash >( "fnv1a_hash" );
test< old_boost_hash >( "old_boost_hash" );
#ifdef HAVE_ABSEIL #ifdef HAVE_ABSEIL