Skip to content

Commit 9aa8055

Browse files
committed
Comments on hash_combine.
1 parent 0a28c5f commit 9aa8055

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

include/bitcoin/system/impl/hash/functions.ipp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,19 +240,20 @@ INLINE constexpr size_t djb2_hash(const data_slice& data) NOEXCEPT
240240
// Combine hash values, such as djb2_hash or unique_hash outputs.
241241
INLINE constexpr size_t hash_combine(size_t left, size_t right) NOEXCEPT
242242
{
243+
//// This leads to mixing null points (850k identical) with other buckets.
243244
////constexpr auto prime1 = possible_narrow_cast<size_t>(0x9e3779b97f4a7c15_u64);
244245
////constexpr auto prime2 = possible_narrow_cast<size_t>(0x517cc1b727220a95_u64);
245-
246+
////
246247
////auto first = left;
247248
////first ^= shift_right(first, 23);
248249
////first *= prime1;
249250
////first ^= shift_right(first, 19);
250-
251+
////
251252
////auto second = right;
252253
////second ^= shift_right(second, 13);
253254
////second *= prime2;
254255
////second ^= shift_right(second, 31);
255-
256+
////
256257
////// seed parameter, defaults to zero.
257258
////first ^= second;
258259
////first += seed;

0 commit comments

Comments
 (0)