Skip to content

Commit 42e3dcb

Browse files
committed
go.mod: require Go 1.26
The block loop indexes data[i:i+16]. Go 1.25 cannot prove that window in bounds and emits bounds checks, the reslice guard and five spills into the loop, 32 to 50 percent behind the old assembly on 128 bit inputs of 16 bytes and more, where 1.26 and 1.27 are within 7 percent and ahead below 64 bytes. 1.25 has been out of support since 1.27.
1 parent c5c16f4 commit 42e3dcb

3 files changed

Lines changed: 25 additions & 24 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
go: ['1.25', oldstable, stable]
13+
go: ['1.26', oldstable, stable]
1414
steps:
1515
- uses: actions/checkout@v4
1616
- uses: actions/setup-go@v5

‎README.md‎

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -62,30 +62,31 @@ Benchmarks
6262
Cycles per call from perf (`cycles:u` at a fixed iteration count, minimum of
6363
three runs) on a Comet Lake i7-10710U, so CPU frequency and thermal
6464
throttling drop out. `asm` is the amd64 assembly this library shipped through
65-
v1.1.8; the other columns are this code built by that Go release. `Sizes`
65+
v1.1.8; the other columns are this code built by that Go release. Go 1.26
66+
is the minimum this module declares. `Sizes`
6667
rows exercise the block loop, `Branches` rows the 0 to 16 byte tail, and
6768
`RandomLengths` rows draw an xorshift length in [0, 64) on every call.
6869

6970
```
70-
benchmark asm go1.25 go1.26 go1.27 1.26/asm 1.27/asm
71-
128Branches/3 25 25 21 21 -16.7% -16.7%
72-
128Branches/7 26 26 21 21 -18.6% -18.5%
73-
128Branches/13 25 27 22 22 -12.5% -14.5%
74-
128Branches/16 27 35 26 26 -1.4% -1.3%
75-
128Sizes/32 35 46 34 34 -2.3% -2.2%
76-
128Sizes/64 48 70 48 49 +1.2% +1.2%
77-
128Sizes/256 140 209 149 149 +6.9% +6.8%
78-
128Sizes/1024 534 769 567 557 +6.2% +4.3%
79-
128Sizes/8192 4215 6212 4361 4363 +3.5% +3.5%
80-
64Sizes/32 35 46 34 34 -3.7% -3.5%
81-
64Sizes/1024 535 788 575 557 +7.4% +4.1%
82-
64Sizes/8192 4221 6326 4360 4366 +3.3% +3.4%
83-
32Branches/3 15 19 16 16 +5.2% +5.6%
84-
32Sizes/32 50 56 41 41 -18.2% -18.0%
85-
32Sizes/64 89 97 77 77 -13.6% -13.6%
86-
32Sizes/256 322 339 296 302 -7.9% -6.2%
87-
32Sizes/1024 1284 1335 1243 1211 -3.2% -5.7%
88-
32Sizes/8192 10080 10405 9896 9582 -1.8% -4.9%
89-
RandomLengths128 110 88 91 90 -18.0% -18.2%
90-
RandomLengths32 96 88 83 85 -13.5% -11.4%
71+
benchmark asm go1.26 go1.27 1.26/asm 1.27/asm
72+
128Branches/3 25 21 21 -16.7% -16.7%
73+
128Branches/7 26 21 21 -18.6% -18.5%
74+
128Branches/13 25 22 22 -12.5% -14.5%
75+
128Branches/16 27 26 26 -1.4% -1.3%
76+
128Sizes/32 35 34 34 -2.3% -2.2%
77+
128Sizes/64 48 48 49 +1.2% +1.2%
78+
128Sizes/256 140 149 149 +6.9% +6.8%
79+
128Sizes/1024 534 567 557 +6.2% +4.3%
80+
128Sizes/8192 4215 4361 4363 +3.5% +3.5%
81+
64Sizes/32 35 34 34 -3.7% -3.5%
82+
64Sizes/1024 535 575 557 +7.4% +4.1%
83+
64Sizes/8192 4221 4360 4366 +3.3% +3.4%
84+
32Branches/3 15 16 16 +5.2% +5.6%
85+
32Sizes/32 50 41 41 -18.2% -18.0%
86+
32Sizes/64 89 77 77 -13.6% -13.6%
87+
32Sizes/256 322 296 302 -7.9% -6.2%
88+
32Sizes/1024 1284 1243 1211 -3.2% -5.7%
89+
32Sizes/8192 10080 9896 9582 -1.8% -4.9%
90+
RandomLengths128 110 91 90 -18.0% -18.2%
91+
RandomLengths32 96 83 85 -13.5% -11.4%
9192
```

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/twmb/murmur3
22

3-
go 1.25
3+
go 1.26

0 commit comments

Comments
 (0)