authorgravatar for david@vortan.devDavid Rubin <david@vortan.dev> 2024-12-15 03:40:20-08:00
committergravatar for david@vortan.devDavid Rubin <david@vortan.dev> 2024-12-15 03:40:20-08:00
logb58916bb7ca2ef4087107c630ed5118d1bf91dea
tree0d29cf1e22d5196b0344e1b2e8857df1a111ba4e
parentaf89bb05d392b34a9ac257d166df1c794542f2e8
signaturelock-open Commit is signed but in an unrecognized format.

correct the hint in `XxHash3`


1 files changed, 5 insertions(+), 5 deletions(-)

lib/std/hash/xxhash.zig+5-5
......@@ -593,7 +593,7 @@ pub const XxHash3 = struct {
593593 }
594594
595595 fn hash3(seed: u64, input: anytype, noalias secret: *const [192]u8) u64 {
596 @branchHint(.cold);
596 @branchHint(.unlikely);
597597 std.debug.assert(input.len > 0 and input.len < 4);
598598
599599 const flip: [2]u32 = @bitCast(secret[0..8].*);
......@@ -625,7 +625,7 @@ pub const XxHash3 = struct {
625625 }
626626
627627 fn hash16(seed: u64, input: anytype, noalias secret: *const [192]u8) u64 {
628 @branchHint(.cold);
628 @branchHint(.unlikely);
629629 std.debug.assert(input.len > 8 and input.len <= 16);
630630
631631 const flip: [4]u64 = @bitCast(secret[24..56].*);
......@@ -641,7 +641,7 @@ pub const XxHash3 = struct {
641641 }
642642
643643 fn hash128(seed: u64, input: anytype, noalias secret: *const [192]u8) u64 {
644 @branchHint(.cold);
644 @branchHint(.unlikely);
645645 std.debug.assert(input.len > 16 and input.len <= 128);
646646
647647 var acc = XxHash64.prime_1 *% @as(u64, input.len);
......@@ -657,7 +657,7 @@ pub const XxHash3 = struct {
657657 }
658658
659659 fn hash240(seed: u64, input: anytype, noalias secret: *const [192]u8) u64 {
660 @branchHint(.cold);
660 @branchHint(.unlikely);
661661 std.debug.assert(input.len > 128 and input.len <= 240);
662662
663663 var acc = XxHash64.prime_1 *% @as(u64, input.len);
......@@ -676,7 +676,7 @@ pub const XxHash3 = struct {
676676 }
677677
678678 noinline fn hashLong(seed: u64, input: []const u8) u64 {
679 @branchHint(.cold);
679 @branchHint(.unlikely);
680680 std.debug.assert(input.len >= 240);
681681
682682 const block_count = ((input.len - 1) / @sizeOf(Block)) * @sizeOf(Block);