Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ internal static CastResult TryGet(int[] table, nuint source, nuint target)
TableMask(ref tableData) = size - 1;

// Fibonacci hash reduces the value into desired range by shifting right by the number of leading zeroes in 'size-1'
byte shift = (byte)BitOperations.LeadingZeroCount(size - 1);
byte shift = (byte)BitOperations.LeadingZeroCount((nuint)(size - 1));
HashShift(ref tableData) = shift;

return table;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ internal bool TryGet(TKey key, out TValue? value)
ref Entry tableData = ref TableData(table);

// Fibonacci hash reduces the value into desired range by shifting right by the number of leading zeroes in 'size-1'
byte shift = (byte)BitOperations.LeadingZeroCount(size - 1);
byte shift = (byte)BitOperations.LeadingZeroCount((nuint)(size - 1));
HashShift(table) = shift;

return table;
Expand Down