Skip to content

Commit

Permalink
Failed tentative hash not using __m128
Browse files Browse the repository at this point in the history
  • Loading branch information
hivert committed Jan 11, 2018
1 parent 7730916 commit 4750f7f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/perm16.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,14 @@ template <> struct hash<HPCombi::Vect16> {
__int128 v0 = _mm_extract_epi64(ar.v, 0);
__int128 v1 = _mm_extract_epi64(ar.v, 1);
return ((v1 * HPCombi::prime + v0) * HPCombi::prime) >> 64;

/* The following is extremely slow on Renner benchmark
uint64_t v0 = _mm_extract_epi64(ar.v, 0);
uint64_t v1 = _mm_extract_epi64(ar.v, 1);
size_t seed = v0 + 0x9e3779b9;
seed ^= v1 + 0x9e3779b9 + (seed<<6) + (seed>>2);
return seed;
*/
}
};

Expand Down

0 comments on commit 4750f7f

Please sign in to comment.