@@ -18,7 +18,6 @@ const (
1818
1919var axSeed = axSec0 ^ axPri0
2020
21- // axMul is folded_multiply: 128-bit product, XOR of high and low halves.
2221func axMul (x , y uint64 ) uint64 {
2322 hi , lo := bits .Mul64 (x , y )
2423 return hi ^ lo
@@ -32,8 +31,6 @@ func axR8(s string, i int) uint64 {
3231 return axR4 (s , i ) | axR4 (s , i + 4 )<< 32
3332}
3433
35- // axhash is the entry point. Dispatch mirrors the original axhash-core
36- // tier structure but uses only compile-time constants as secrets.
3734func axhash (key string ) uint32 {
3835 n := len (key )
3936 if n == 0 {
@@ -52,7 +49,6 @@ func axhash(key string) uint32 {
5249 return uint32 (axLong (key , n , rotated ))
5350}
5451
55- // axShort handles 1–16 bytes. Identical to the original scalar backend.
5652func axShort (key string , n int , acc uint64 ) uint64 {
5753 lm := uint64 (n ) * axLenMul
5854 if n >= 8 {
@@ -83,7 +79,6 @@ func axShort(key string, n int, acc uint64) uint64 {
8379 return axMul (m0 , lm ^ axPri0 )
8480}
8581
86- // axMid1732 handles 17–32 bytes. Identical to the original scalar backend.
8782func axMid1732 (key string , n int , acc uint64 ) uint64 {
8883 lm := uint64 (n ) * axLenMul
8984 a , b := axR8 (key , 0 ), axR8 (key , 8 )
@@ -93,7 +88,6 @@ func axMid1732(key string, n int, acc uint64) uint64 {
9388 return axMul (front ^ bits .RotateLeft64 (back , 17 )^ acc , lm ^ axSec2 )
9489}
9590
96- // axMid3364 handles 33–64 bytes. Identical to the original scalar backend.
9791func axMid3364 (key string , n int , acc uint64 ) uint64 {
9892 lm := uint64 (n ) * axLenMul
9993 w0 , w1 := axR8 (key , 0 ), axR8 (key , 8 )
@@ -110,9 +104,6 @@ func axMid3364(key string, n int, acc uint64) uint64 {
110104 return axMul (bits .RotateLeft64 (m ^ lm , 23 ), axSec1 ^ acc )
111105}
112106
113- // axLong handles strings > 64 bytes.
114- // Replaces the original multi-lane stripe machinery with a simple rolling mix.
115- // Map keys this long are rare; uniform distribution is preserved.
116107func axLong (key string , n int , seed uint64 ) uint64 {
117108 i := 0
118109 for ; i + 16 <= n ; i += 16 {
0 commit comments