| ... | ... | @@ -593,7 +593,7 @@ pub const XxHash3 = struct { |
| 593 | 593 | } |
| 594 | 594 | |
| 595 | 595 | fn hash3(seed: u64, input: anytype, noalias secret: *const [192]u8) u64 { |
| 596 | | @branchHint(.cold); |
| 596 | @branchHint(.unlikely); |
| 597 | 597 | std.debug.assert(input.len > 0 and input.len < 4); |
| 598 | 598 | |
| 599 | 599 | const flip: [2]u32 = @bitCast(secret[0..8].*); |
| ... | ... | @@ -625,7 +625,7 @@ pub const XxHash3 = struct { |
| 625 | 625 | } |
| 626 | 626 | |
| 627 | 627 | fn hash16(seed: u64, input: anytype, noalias secret: *const [192]u8) u64 { |
| 628 | | @branchHint(.cold); |
| 628 | @branchHint(.unlikely); |
| 629 | 629 | std.debug.assert(input.len > 8 and input.len <= 16); |
| 630 | 630 | |
| 631 | 631 | const flip: [4]u64 = @bitCast(secret[24..56].*); |
| ... | ... | @@ -641,7 +641,7 @@ pub const XxHash3 = struct { |
| 641 | 641 | } |
| 642 | 642 | |
| 643 | 643 | fn hash128(seed: u64, input: anytype, noalias secret: *const [192]u8) u64 { |
| 644 | | @branchHint(.cold); |
| 644 | @branchHint(.unlikely); |
| 645 | 645 | std.debug.assert(input.len > 16 and input.len <= 128); |
| 646 | 646 | |
| 647 | 647 | var acc = XxHash64.prime_1 *% @as(u64, input.len); |
| ... | ... | @@ -657,7 +657,7 @@ pub const XxHash3 = struct { |
| 657 | 657 | } |
| 658 | 658 | |
| 659 | 659 | fn hash240(seed: u64, input: anytype, noalias secret: *const [192]u8) u64 { |
| 660 | | @branchHint(.cold); |
| 660 | @branchHint(.unlikely); |
| 661 | 661 | std.debug.assert(input.len > 128 and input.len <= 240); |
| 662 | 662 | |
| 663 | 663 | var acc = XxHash64.prime_1 *% @as(u64, input.len); |
| ... | ... | @@ -676,7 +676,7 @@ pub const XxHash3 = struct { |
| 676 | 676 | } |
| 677 | 677 | |
| 678 | 678 | noinline fn hashLong(seed: u64, input: []const u8) u64 { |
| 679 | | @branchHint(.cold); |
| 679 | @branchHint(.unlikely); |
| 680 | 680 | std.debug.assert(input.len >= 240); |
| 681 | 681 | |
| 682 | 682 | const block_count = ((input.len - 1) / @sizeOf(Block)) * @sizeOf(Block); |