Skip to content

runtime: optimize slice and string map paths - #3032

Merged
cpunion merged 4 commits into
xgo-dev:mainfrom
go-wyvern:slice-map-fastpath
Nov 10, 2026
Merged

cpunion merged 4 commits into
xgo-dev:mainfrom
go-wyvern:slice-map-fastpath

Conversation

@go-wyvern

Copy link
Copy Markdown
Contributor

No description provided.

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: runtime string-map and slice fast paths

Overall this is a clean, well-reasoned optimization. I verified the two hot-path changes against their surrounding code and the helpers they replace, and ran each dimension (correctness/safety, performance, code quality, docs) over the diff.

What the PR does

  • map_faststr.go: replaces stringStructOf(&ky) with a stack-local stringStruct{unsafe.StringData(ky), len(ky)} and adds hashMapKeyString, which keeps the temporary string header on the stack via c.Alloca before calling t.Hasher — a faithful mirror of the existing hashMapKey32/hashMapKey64 helpers. This removes the per-operation header heap allocation.
  • z_slice.go: NewSlice2/NewSlice3Bounds fold the signed/negative/unsigned index checks into single uint64(idx) > uint64(bound) comparisons and move the boundsSliceAcap/boundsSliceAlen selection onto the cold panic path.

Correctness & safety — verified sound

  • The uint64 rewrite is semantically equivalent to the removed boundsOutOfRange/boundsAbove, given cap is non-negative (confirmed at the call sites in ssa/datastruct.go: nCap comes from SliceCap/array Len/StringLen, all ≥ 0). Negative signed and high-bit unsigned indexes still panic; valid 0 ≤ i ≤ j ≤ cap still pass.
  • unsafe.StringData on an empty key is safe here: the k.len != key.len guard plus memequal's size == 0 short-circuit prevent any zero-size deref, and the 4-byte long-key comparisons run only under key.len >= 32.
  • GC-safety is preserved: the Alloca stack header stays live across the t.Hasher call, and the key stored into the bucket roots the same backing bytes (covered by TestMapFastStringKeysSurviveGrowthAndGC).
  • boundsOutOfRange/boundsAbove are correctly retained for z_string.go.

The two inline notes below are minor maintainability suggestions — nothing blocking.

Comment thread runtime/internal/runtime/z_slice.go Resolved
@codecov

codecov Bot commented Nov 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

LLGo WebAssembly build benchmarks

dc638a08b819 | workflow run | long-term charts

WebAssembly output sizes
Example, profile and compiler Wasm module vs base Generated JS glue vs base
cprintf/j32-emscripten/LLGo 152379 B -40 B / -0.02624% (better) 88932 B 0 B / +0.0%
cprintf/j32-goos-js/LLGo 151333 B -36 B / -0.02378% (better) 72985 B 0 B / +0.0%
cprintf/j64-emscripten-memory64/LLGo 139867 B -26 B / -0.01859% (better) 92103 B 0 B / +0.0%
cprintf/w32-goos-wasip1/LLGo 15937 B 0 B / +0.0% 0 B 0 B / 0.0%
cprintf/w32-wasi/LLGo 15937 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/j32-emscripten/LLGo 1614179 B +698 B / +0.04326% (worse) 118989 B 0 B / +0.0%
fmtprintf/j32-goos-js/Go 2526852 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/j32-goos-js/LLGo 1672622 B +683 B / +0.04085% (worse) 89403 B 0 B / +0.0%
fmtprintf/j64-emscripten-memory64/LLGo 1503295 B +570 B / +0.03793% (worse) 121804 B 0 B / +0.0%
fmtprintf/w32-goos-wasip1/Go 2500019 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/w32-goos-wasip1/LLGo 1060312 B +491 B / +0.04633% (worse) 0 B 0 B / 0.0%
fmtprintf/w32-wasi/LLGo 1060952 B +687 B / +0.1% (worse) 0 B 0 B / 0.0%
j32-emscripten/LLGo 151591 B -40 B / -0.02638% (better) 88932 B 0 B / +0.0%
j32-goos-js/Go 1895533 B 0 B / +0.0% 0 B 0 B / 0.0%
j32-goos-js/LLGo 150800 B -36 B / -0.02387% (better) 72985 B 0 B / +0.0%
j64-emscripten-memory64/LLGo 139125 B -26 B / -0.01868% (better) 92103 B 0 B / +0.0%
reflectcall/j32-emscripten/LLGo 1346625 B -142 B / -0.01054% (better) 95624 B 0 B / +0.0%
reflectcall/j32-goos-js/Go 2191221 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/j32-goos-js/LLGo 1361193 B -145 B / -0.01065% (better) 79673 B 0 B / +0.0%
reflectcall/j64-emscripten-memory64/LLGo 1234433 B -132 B / -0.01069% (better) 99045 B 0 B / +0.0%
reflectcall/w32-goos-wasip1/Go 2205707 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/w32-goos-wasip1/LLGo 997845 B -147 B / -0.01473% (better) 0 B 0 B / 0.0%
reflectcall/w32-wasi/LLGo 998435 B -147 B / -0.01472% (better) 0 B 0 B / 0.0%
w32-goos-wasip1/Go 1909947 B 0 B / +0.0% 0 B 0 B / 0.0%
w32-goos-wasip1/LLGo 18855 B 0 B / +0.0% 0 B 0 B / 0.0%
w32-wasi/LLGo 18855 B 0 B / +0.0% 0 B 0 B / 0.0%
LLGo WebAssembly build measurements
Example and profile Build vs base
j32-emscripten 10.253 s -1.692 s / -14.2% (better)
j32-goos-js 10.070 s -2.166 s / -17.7% (better)
j64-emscripten-memory64 9.687 s -571.2 ms / -5.6% (better)
reflectcall/w32-wasi 35.187 s +143.8 ms / +0.4% (worse)
w32-goos-wasip1 5.313 s -1.08 s / -16.9% (better)
w32-wasi 5.183 s -100.7 ms / -1.9% (better)

Compared with 3d92a58e09bd measured in the same runner job.

@github-actions

Copy link
Copy Markdown

LLGo baseline benchmarks

2e2783d2d43b | workflow run | long-term charts

String equality benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkStringEquality/bytes/equal/1024/Go 25.760 ns/op -0.11 ns/op / -0.4% (better)
Linux BenchmarkStringEquality/bytes/equal/1024/LLGo 63.900 ns/op +0.47 ns/op / +0.7% (worse)
Linux BenchmarkStringEquality/bytes/equal/128/Go 8.312 ns/op -0.622 ns/op / -7.0% (better)
Linux BenchmarkStringEquality/bytes/equal/128/LLGo 12.050 ns/op +0.01 ns/op / +0.1% (worse)
Linux BenchmarkStringEquality/bytes/equal/8/Go 5.826 ns/op -0.024 ns/op / -0.4% (better)
Linux BenchmarkStringEquality/bytes/equal/8/LLGo 4.749 ns/op +0.083 ns/op / +1.8% (worse)
Linux BenchmarkStringEquality/bytes/first/1024/Go 6.612 ns/op 0 ns/op / +0.0%
Linux BenchmarkStringEquality/bytes/first/1024/LLGo 3.501 ns/op -0.527 ns/op / -13.1% (better)
Linux BenchmarkStringEquality/bytes/first/128/Go 6.618 ns/op +0.003 ns/op / +0.04535% (worse)
Linux BenchmarkStringEquality/bytes/first/128/LLGo 3.523 ns/op +0.416 ns/op / +13.4% (worse)
Linux BenchmarkStringEquality/bytes/first/8/Go 5.814 ns/op -0.002 ns/op / -0.03439% (better)
Linux BenchmarkStringEquality/bytes/first/8/LLGo 3.527 ns/op +0.41 ns/op / +13.2% (worse)
Linux BenchmarkStringEquality/bytes/last/1024/Go 25.120 ns/op -0.36 ns/op / -1.4% (better)
Linux BenchmarkStringEquality/bytes/last/1024/LLGo 63.550 ns/op -0.2 ns/op / -0.3% (better)
Linux BenchmarkStringEquality/bytes/last/128/Go 8.146 ns/op -0.881 ns/op / -9.8% (better)
Linux BenchmarkStringEquality/bytes/last/128/LLGo 11.800 ns/op -0.04 ns/op / -0.3% (better)
Linux BenchmarkStringEquality/bytes/last/8/Go 5.816 ns/op -0.003 ns/op / -0.1% (better)
Linux BenchmarkStringEquality/bytes/last/8/LLGo 4.665 ns/op +0.743 ns/op / +18.9% (worse)
Linux BenchmarkStringEquality/strings/equal/1024/Go 23.170 ns/op -0.04 ns/op / -0.2% (better)
Linux BenchmarkStringEquality/strings/equal/1024/LLGo 56.980 ns/op +0.52 ns/op / +0.9% (worse)
Linux BenchmarkStringEquality/strings/equal/128/Go 8.228 ns/op -0.687 ns/op / -7.7% (better)
Linux BenchmarkStringEquality/strings/equal/128/LLGo 12.020 ns/op +0.09 ns/op / +0.8% (worse)
Linux BenchmarkStringEquality/strings/equal/8/Go 5.836 ns/op -0.003 ns/op / -0.1% (better)
Linux BenchmarkStringEquality/strings/equal/8/LLGo 3.941 ns/op -0.352 ns/op / -8.2% (better)
Linux BenchmarkStringEquality/strings/first/1024/Go 6.596 ns/op -0.005 ns/op / -0.1% (better)
Linux BenchmarkStringEquality/strings/first/1024/LLGo 2.726 ns/op -0.043 ns/op / -1.6% (better)
Linux BenchmarkStringEquality/strings/first/128/Go 6.597 ns/op -0.008 ns/op / -0.1% (better)
Linux BenchmarkStringEquality/strings/first/128/LLGo 2.721 ns/op -0.021 ns/op / -0.8% (better)
Linux BenchmarkStringEquality/strings/first/8/Go 5.817 ns/op -0.003 ns/op / -0.1% (better)
Linux BenchmarkStringEquality/strings/first/8/LLGo 2.760 ns/op +0.034 ns/op / +1.2% (worse)
Linux BenchmarkStringEquality/strings/last/1024/Go 25.610 ns/op +2.79 ns/op / +12.2% (worse)
Linux BenchmarkStringEquality/strings/last/1024/LLGo 56.260 ns/op -0.22 ns/op / -0.4% (better)
Linux BenchmarkStringEquality/strings/last/128/Go 8.147 ns/op -0.023 ns/op / -0.3% (better)
Linux BenchmarkStringEquality/strings/last/128/LLGo 11.820 ns/op +0.13 ns/op / +1.1% (worse)
Linux BenchmarkStringEquality/strings/last/8/Go 5.817 ns/op +0.002 ns/op / +0.03439% (worse)
Linux BenchmarkStringEquality/strings/last/8/LLGo 3.501 ns/op +0.005 ns/op / +0.1% (worse)
macOS BenchmarkStringEquality/bytes/equal/1024/Go 23.170 ns/op -5.18 ns/op / -18.3% (better)
macOS BenchmarkStringEquality/bytes/equal/1024/LLGo 20.010 ns/op -2.48 ns/op / -11.0% (better)
macOS BenchmarkStringEquality/bytes/equal/128/Go 5.406 ns/op -0.312 ns/op / -5.5% (better)
macOS BenchmarkStringEquality/bytes/equal/128/LLGo 3.728 ns/op -0.443 ns/op / -10.6% (better)
macOS BenchmarkStringEquality/bytes/equal/8/Go 4.063 ns/op +0.038 ns/op / +0.9% (worse)
macOS BenchmarkStringEquality/bytes/equal/8/LLGo 2.658 ns/op -0.154 ns/op / -5.5% (better)
macOS BenchmarkStringEquality/bytes/first/1024/Go 3.473 ns/op -0.398 ns/op / -10.3% (better)
macOS BenchmarkStringEquality/bytes/first/1024/LLGo 1.911 ns/op -0.038 ns/op / -1.9% (better)
macOS BenchmarkStringEquality/bytes/first/128/Go 3.683 ns/op -1.562 ns/op / -29.8% (better)
macOS BenchmarkStringEquality/bytes/first/128/LLGo 1.774 ns/op -0.141 ns/op / -7.4% (better)
macOS BenchmarkStringEquality/bytes/first/8/Go 3.731 ns/op +0.128 ns/op / +3.6% (worse)
macOS BenchmarkStringEquality/bytes/first/8/LLGo 1.726 ns/op -0.288 ns/op / -14.3% (better)
macOS BenchmarkStringEquality/bytes/last/1024/Go 22.320 ns/op -7.85 ns/op / -26.0% (better)
macOS BenchmarkStringEquality/bytes/last/1024/LLGo 19.990 ns/op -1.86 ns/op / -8.5% (better)
macOS BenchmarkStringEquality/bytes/last/128/Go 5 ns/op -0.494 ns/op / -9.0% (better)
macOS BenchmarkStringEquality/bytes/last/128/LLGo 3.329 ns/op -0.491 ns/op / -12.9% (better)
macOS BenchmarkStringEquality/bytes/last/8/Go 3.969 ns/op +0.292 ns/op / +7.9% (worse)
macOS BenchmarkStringEquality/bytes/last/8/LLGo 2.290 ns/op -0.306 ns/op / -11.8% (better)
macOS BenchmarkStringEquality/strings/equal/1024/Go 24.240 ns/op -4.73 ns/op / -16.3% (better)
macOS BenchmarkStringEquality/strings/equal/1024/LLGo 20.360 ns/op -1.68 ns/op / -7.6% (better)
macOS BenchmarkStringEquality/strings/equal/128/Go 5.806 ns/op -1.298 ns/op / -18.3% (better)
macOS BenchmarkStringEquality/strings/equal/128/LLGo 3.730 ns/op -0.332 ns/op / -8.2% (better)
macOS BenchmarkStringEquality/strings/equal/8/Go 4.097 ns/op +0.154 ns/op / +3.9% (worse)
macOS BenchmarkStringEquality/strings/equal/8/LLGo 2.578 ns/op -0.236 ns/op / -8.4% (better)
macOS BenchmarkStringEquality/strings/first/1024/Go 3.589 ns/op -0.159 ns/op / -4.2% (better)
macOS BenchmarkStringEquality/strings/first/1024/LLGo 1.725 ns/op -0.2 ns/op / -10.4% (better)
macOS BenchmarkStringEquality/strings/first/128/Go 3.780 ns/op -0.208 ns/op / -5.2% (better)
macOS BenchmarkStringEquality/strings/first/128/LLGo 1.929 ns/op -0.073 ns/op / -3.6% (better)
macOS BenchmarkStringEquality/strings/first/8/Go 3.850 ns/op +0.341 ns/op / +9.7% (worse)
macOS BenchmarkStringEquality/strings/first/8/LLGo 1.730 ns/op -0.148 ns/op / -7.9% (better)
macOS BenchmarkStringEquality/strings/last/1024/Go 22.480 ns/op -4.83 ns/op / -17.7% (better)
macOS BenchmarkStringEquality/strings/last/1024/LLGo 19.710 ns/op -2.15 ns/op / -9.8% (better)
macOS BenchmarkStringEquality/strings/last/128/Go 5.127 ns/op -0.164 ns/op / -3.1% (better)
macOS BenchmarkStringEquality/strings/last/128/LLGo 3.265 ns/op -0.533 ns/op / -14.0% (better)
macOS BenchmarkStringEquality/strings/last/8/Go 3.953 ns/op +0.201 ns/op / +5.4% (worse)
macOS BenchmarkStringEquality/strings/last/8/LLGo 2.291 ns/op -0.313 ns/op / -12.0% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/1024/Go 20.150 ns/op +0.07 ns/op / +0.3% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/1024/LLGo 49.470 ns/op +7.67 ns/op / +18.3% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/128/Go 7.475 ns/op -0.006 ns/op / -0.1% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/128/LLGo 11.290 ns/op +0.07 ns/op / +0.6% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/8/Go 5.897 ns/op -0.057 ns/op / -1.0% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/8/LLGo 4.690 ns/op -0.418 ns/op / -8.2% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/1024/Go 5.954 ns/op +0.066 ns/op / +1.1% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/1024/LLGo 3.709 ns/op -0.05 ns/op / -1.3% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/128/Go 5.966 ns/op -0.051 ns/op / -0.8% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/128/LLGo 3.761 ns/op +0.053 ns/op / +1.4% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/8/Go 6.061 ns/op +0.181 ns/op / +3.1% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/8/LLGo 3.709 ns/op +0.002 ns/op / +0.1% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/1024/Go 19.310 ns/op -0.14 ns/op / -0.7% (better)
Windows MinGW BenchmarkStringEquality/bytes/last/1024/LLGo 41 ns/op -0.15 ns/op / -0.4% (better)
Windows MinGW BenchmarkStringEquality/bytes/last/128/Go 6.553 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkStringEquality/bytes/last/128/LLGo 10.700 ns/op -0.31 ns/op / -2.8% (better)
Windows MinGW BenchmarkStringEquality/bytes/last/8/Go 5.879 ns/op -0.047 ns/op / -0.8% (better)
Windows MinGW BenchmarkStringEquality/bytes/last/8/LLGo 4.328 ns/op -0.097 ns/op / -2.2% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/1024/Go 20.140 ns/op -0.16 ns/op / -0.8% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/1024/LLGo 48.080 ns/op +10.04 ns/op / +26.4% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/128/Go 7.432 ns/op -0.099 ns/op / -1.3% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/128/LLGo 7.829 ns/op -0.372 ns/op / -4.5% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/8/Go 6.007 ns/op +0.029 ns/op / +0.5% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/8/LLGo 3.492 ns/op -0.212 ns/op / -5.7% (better)
Windows MinGW BenchmarkStringEquality/strings/first/1024/Go 6.031 ns/op +0.144 ns/op / +2.4% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/1024/LLGo 3.881 ns/op +1.4 ns/op / +56.4% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/128/Go 5.976 ns/op +0.03 ns/op / +0.5% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/128/LLGo 2.833 ns/op +0.358 ns/op / +14.5% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/8/Go 5.881 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkStringEquality/strings/first/8/LLGo 2.779 ns/op +0.14 ns/op / +5.3% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/1024/Go 19.440 ns/op +0.07 ns/op / +0.4% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/1024/LLGo 38.750 ns/op +1.15 ns/op / +3.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/128/Go 6.710 ns/op +0.159 ns/op / +2.4% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/128/LLGo 7.831 ns/op +0.14 ns/op / +1.8% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/8/Go 5.864 ns/op -0.037 ns/op / -0.6% (better)
Windows MinGW BenchmarkStringEquality/strings/last/8/LLGo 3.477 ns/op +0.387 ns/op / +12.5% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/1024/Go 32.490 ns/op +0.18 ns/op / +0.6% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/1024/LLGo 41.180 ns/op -0.1 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/128/Go 10.240 ns/op -0.52 ns/op / -4.8% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/128/LLGo 9.074 ns/op -0.186 ns/op / -2.0% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/8/Go 7.269 ns/op -0.184 ns/op / -2.5% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/8/LLGo 5.172 ns/op +0.325 ns/op / +6.7% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/1024/Go 7.874 ns/op +0.084 ns/op / +1.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/1024/LLGo 3.926 ns/op +0.179 ns/op / +4.8% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/128/Go 7.821 ns/op +0.159 ns/op / +2.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/128/LLGo 3.922 ns/op +0.111 ns/op / +2.9% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/8/Go 5.567 ns/op -0.301 ns/op / -5.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/8/LLGo 3.913 ns/op +0.172 ns/op / +4.6% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/1024/Go 31.820 ns/op -0.25 ns/op / -0.8% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/1024/LLGo 40.380 ns/op -0.12 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/128/Go 8.959 ns/op -0.029 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/128/LLGo 8.865 ns/op +0.077 ns/op / +0.9% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/8/Go 7.238 ns/op -0.18 ns/op / -2.4% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/8/LLGo 4.945 ns/op -0.139 ns/op / -2.7% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/1024/Go 27.670 ns/op -0.26 ns/op / -0.9% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/1024/LLGo 38.430 ns/op +0.37 ns/op / +1.0% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/128/Go 10.020 ns/op -1.02 ns/op / -9.2% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/128/LLGo 9.137 ns/op -0.003 ns/op / -0.03282% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/8/Go 7.882 ns/op +0.161 ns/op / +2.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/8/LLGo 4.823 ns/op +0.005 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/1024/Go 7.070 ns/op +0.242 ns/op / +3.5% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/1024/LLGo 3.917 ns/op -0.021 ns/op / -0.5% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/128/Go 6.817 ns/op -0.184 ns/op / -2.6% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/128/LLGo 3.904 ns/op -0.114 ns/op / -2.8% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/8/Go 5.599 ns/op +0.075 ns/op / +1.4% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/8/LLGo 3.931 ns/op -0.06 ns/op / -1.5% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/1024/Go 26.500 ns/op +0.2 ns/op / +0.8% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/last/1024/LLGo 42.320 ns/op +4.81 ns/op / +12.8% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/last/128/Go 8.423 ns/op -0.293 ns/op / -3.4% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/128/LLGo 8.740 ns/op -0.081 ns/op / -0.9% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/8/Go 7.630 ns/op -1.273 ns/op / -14.3% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/8/LLGo 4.885 ns/op -0.2 ns/op / -3.9% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/1024/Go 31.230 ns/op +0.12 ns/op / +0.4% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/1024/LLGo 39.970 ns/op +0.02 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/128/Go 6.699 ns/op -0.101 ns/op / -1.5% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/128/LLGo 7.394 ns/op -0.01 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/8/Go 3.760 ns/op -0.044 ns/op / -1.2% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/8/LLGo 2.832 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/1024/Go 4.729 ns/op -0.086 ns/op / -1.8% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/1024/LLGo 2.035 ns/op -0.041 ns/op / -2.0% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/128/Go 4.817 ns/op -0.051 ns/op / -1.0% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/128/LLGo 1.885 ns/op -0.001 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/8/Go 3.431 ns/op -0.117 ns/op / -3.3% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/8/LLGo 1.880 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/1024/Go 31 ns/op -0.09 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/1024/LLGo 39.970 ns/op +0.35 ns/op / +0.9% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/128/Go 6.826 ns/op +0.126 ns/op / +1.9% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/128/LLGo 6.997 ns/op +0.017 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/8/Go 3.379 ns/op -0.177 ns/op / -5.0% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/8/LLGo 2.543 ns/op -0.003 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/1024/Go 27.440 ns/op -0.14 ns/op / -0.5% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/1024/LLGo 36.430 ns/op -0.24 ns/op / -0.7% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/128/Go 6.065 ns/op +0.007 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/128/LLGo 6.022 ns/op +0.012 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/8/Go 4.077 ns/op +0.177 ns/op / +4.5% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/8/LLGo 2.555 ns/op +0.034 ns/op / +1.3% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/1024/Go 4.502 ns/op -0.007 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/1024/LLGo 1.605 ns/op +0.033 ns/op / +2.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/128/Go 4.527 ns/op -0.036 ns/op / -0.8% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/128/LLGo 1.631 ns/op -0.001 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/8/Go 3.904 ns/op -0.095 ns/op / -2.4% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/8/LLGo 1.607 ns/op -0.004 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/1024/Go 27.180 ns/op +0.09 ns/op / +0.3% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/1024/LLGo 36.180 ns/op +0.11 ns/op / +0.3% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/128/Go 5.927 ns/op +0.01 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/128/LLGo 5.663 ns/op -0.005 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/8/Go 3.873 ns/op -0.037 ns/op / -0.9% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/8/LLGo 2.196 ns/op +0.011 ns/op / +0.5% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/1024/Go 19.370 ns/op -0.05 ns/op / -0.3% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/1024/LLGo 47.390 ns/op +0.05 ns/op / +0.1% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/128/Go 6.236 ns/op -0.159 ns/op / -2.5% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/128/LLGo 10.050 ns/op +0.089 ns/op / +0.9% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/8/Go 4.180 ns/op +0.027 ns/op / +0.7% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/8/LLGo 3.734 ns/op -0.005 ns/op / -0.1% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/1024/Go 5.017 ns/op +0.099 ns/op / +2.0% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/1024/LLGo 2.584 ns/op -0.03 ns/op / -1.1% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/128/Go 5.106 ns/op +0.056 ns/op / +1.1% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/128/LLGo 2.581 ns/op -0.074 ns/op / -2.8% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/8/Go 4.192 ns/op +0.151 ns/op / +3.7% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/8/LLGo 2.687 ns/op +0.104 ns/op / +4.0% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/1024/Go 18.870 ns/op -0.01 ns/op / -0.1% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/1024/LLGo 47.620 ns/op -4.11 ns/op / -7.9% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/128/Go 5.912 ns/op +0.071 ns/op / +1.2% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/128/LLGo 9.564 ns/op +0.048 ns/op / +0.5% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/8/Go 4.212 ns/op -0.052 ns/op / -1.2% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/8/LLGo 3.154 ns/op -0.004 ns/op / -0.1% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/1024/Go 17.520 ns/op +0.04 ns/op / +0.2% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/1024/LLGo 41.560 ns/op -0.1 ns/op / -0.2% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/128/Go 6.125 ns/op -0.04 ns/op / -0.6% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/128/LLGo 8.801 ns/op +0.03 ns/op / +0.3% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/8/Go 4.552 ns/op +0.405 ns/op / +9.8% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/8/LLGo 3.153 ns/op +0.286 ns/op / +10.0% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/1024/Go 5.029 ns/op +0.116 ns/op / +2.4% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/1024/LLGo 2.005 ns/op -0.287 ns/op / -12.5% (better)
Windows MSVC BenchmarkStringEquality/strings/first/128/Go 4.928 ns/op -0.073 ns/op / -1.5% (better)
Windows MSVC BenchmarkStringEquality/strings/first/128/LLGo 2.008 ns/op -0.286 ns/op / -12.5% (better)
Windows MSVC BenchmarkStringEquality/strings/first/8/Go 4.119 ns/op +0.053 ns/op / +1.3% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/8/LLGo 2.006 ns/op -0.286 ns/op / -12.5% (better)
Windows MSVC BenchmarkStringEquality/strings/last/1024/Go 17.070 ns/op +0.15 ns/op / +0.9% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/1024/LLGo 41.540 ns/op -9.5 ns/op / -18.6% (better)
Windows MSVC BenchmarkStringEquality/strings/last/128/Go 5.938 ns/op +0.145 ns/op / +2.5% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/128/LLGo 8.645 ns/op -0.006 ns/op / -0.1% (better)
Windows MSVC BenchmarkStringEquality/strings/last/8/Go 4.089 ns/op -0.081 ns/op / -1.9% (better)
Windows MSVC BenchmarkStringEquality/strings/last/8/LLGo 2.578 ns/op -0.289 ns/op / -10.1% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/1024/Go 20.800 ns/op +0.28 ns/op / +1.4% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/1024/LLGo 65.300 ns/op -0.25 ns/op / -0.4% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/128/Go 6.400 ns/op -0.463 ns/op / -6.7% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/128/LLGo 13.760 ns/op +0.03 ns/op / +0.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/8/Go 5.297 ns/op +0.042 ns/op / +0.8% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/8/LLGo 3.306 ns/op -0.036 ns/op / -1.1% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/1024/Go 4.948 ns/op -0.684 ns/op / -12.1% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/1024/LLGo 2.579 ns/op +0.075 ns/op / +3.0% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/128/Go 5.010 ns/op +0.003 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/128/LLGo 2.479 ns/op +0.103 ns/op / +4.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/8/Go 5.309 ns/op +0.288 ns/op / +5.7% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/8/LLGo 2.405 ns/op +0.036 ns/op / +1.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/1024/Go 20.330 ns/op +0.12 ns/op / +0.6% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/1024/LLGo 63.870 ns/op -0.73 ns/op / -1.1% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/128/Go 6.045 ns/op -0.065 ns/op / -1.1% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/128/LLGo 13.480 ns/op +0.07 ns/op / +0.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/8/Go 5.191 ns/op -1.135 ns/op / -17.9% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/8/LLGo 2.993 ns/op -0.022 ns/op / -0.7% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/1024/Go 20.070 ns/op -0.16 ns/op / -0.8% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/1024/LLGo 71.540 ns/op -1.18 ns/op / -1.6% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/128/Go 5.978 ns/op -0.742 ns/op / -11.0% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/128/LLGo 13.830 ns/op -0.17 ns/op / -1.2% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/8/Go 5.218 ns/op -0.202 ns/op / -3.7% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/8/LLGo 3.427 ns/op -0.201 ns/op / -5.5% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/1024/Go 4.729 ns/op -0.407 ns/op / -7.9% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/1024/LLGo 2.331 ns/op -0.018 ns/op / -0.8% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/128/Go 4.732 ns/op +0.052 ns/op / +1.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/128/LLGo 2.357 ns/op +0.018 ns/op / +0.8% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/8/Go 4.945 ns/op -0.065 ns/op / -1.3% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/8/LLGo 2.355 ns/op -0.009 ns/op / -0.4% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/last/1024/Go 20.060 ns/op +0.4 ns/op / +2.0% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/1024/LLGo 71.190 ns/op +0.13 ns/op / +0.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/128/Go 5.821 ns/op +0.049 ns/op / +0.8% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/128/LLGo 15.640 ns/op +2.16 ns/op / +16.0% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/8/Go 4.381 ns/op -0.954 ns/op / -17.9% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/last/8/LLGo 3.093 ns/op -0.022 ns/op / -0.7% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/1024/Go 31.100 ns/op -0.09 ns/op / -0.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/1024/LLGo 40.310 ns/op -0.1 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/128/Go 6.738 ns/op -0.001 ns/op / -0.01484% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/128/LLGo 7.480 ns/op +0.048 ns/op / +0.6% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/8/Go 3.692 ns/op -0.014 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/8/LLGo 2.767 ns/op -0.001 ns/op / -0.03613% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/1024/Go 4.772 ns/op +0.016 ns/op / +0.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/1024/LLGo 1.943 ns/op +0.115 ns/op / +6.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/128/Go 4.771 ns/op +0.021 ns/op / +0.4% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/128/LLGo 1.746 ns/op -0.007 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/8/Go 3.503 ns/op +0.075 ns/op / +2.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/8/LLGo 1.749 ns/op +0.015 ns/op / +0.9% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/1024/Go 31.020 ns/op +0.05 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/1024/LLGo 39.700 ns/op -0.29 ns/op / -0.7% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/128/Go 6.721 ns/op +0.077 ns/op / +1.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/128/LLGo 7.146 ns/op +0.076 ns/op / +1.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/8/Go 3.545 ns/op +0.001 ns/op / +0.02822% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/8/LLGo 2.423 ns/op -0.056 ns/op / -2.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/1024/Go 27.480 ns/op +0.08 ns/op / +0.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/1024/LLGo 36.470 ns/op +0.11 ns/op / +0.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/128/Go 6.103 ns/op +0.041 ns/op / +0.7% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/128/LLGo 6.096 ns/op +0.074 ns/op / +1.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/8/Go 3.877 ns/op -0.002 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/8/LLGo 2.659 ns/op -0.012 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/1024/Go 4.505 ns/op +0.022 ns/op / +0.5% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/1024/LLGo 1.614 ns/op -0.101 ns/op / -5.9% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/128/Go 4.499 ns/op +0.005 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/128/LLGo 1.627 ns/op +0.055 ns/op / +3.5% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/8/Go 3.868 ns/op +0.018 ns/op / +0.5% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/8/LLGo 1.573 ns/op -0.022 ns/op / -1.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/1024/Go 27.180 ns/op +0.12 ns/op / +0.4% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/1024/LLGo 35.870 ns/op +0.07 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/128/Go 5.908 ns/op -0.006 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/128/LLGo 5.714 ns/op +0.033 ns/op / +0.6% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/8/Go 3.886 ns/op -0.013 ns/op / -0.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/8/LLGo 2.217 ns/op -0.026 ns/op / -1.2% (better)

Program measurements

Platform Workload File size vs base Text size vs base Build vs base Run vs base
Linux cprintf 8576 B 0 B / +0.0% 387 B 0 B / +0.0% 1.069 s -46.58 ms / -4.2% (better) 1.280 ms -115.5 us / -8.3% (better)
Linux cprintf-lto 8240 B 0 B / +0.0% 368 B 0 B / +0.0% 1.061 s +31.54 ms / +3.1% (worse) 1.343 ms +90.81 us / +7.3% (worse)
Linux fmtprintf 1941576 B +752 B / +0.03875% (worse) 268495 B -59 B / -0.02197% (better) 6.812 s -273.1 ms / -3.9% (better) 3.525 ms +480.5 us / +15.8% (worse)
Linux fmtprintf-lto 1019680 B +2048 B / +0.2% (worse) 209160 B -662 B / -0.3% (better) 15.471 s +93.91 ms / +0.6% (worse) 3.340 ms +254 us / +8.2% (worse)
Linux println 260416 B +584 B / +0.2% (worse) 18878 B -35 B / -0.2% (better) 1.146 s +32.07 ms / +2.9% (worse) 1.660 ms +22.38 us / +1.4% (worse)
Linux println-lto 102000 B -264 B / -0.3% (better) 15565 B -10 B / -0.1% (better) 1.829 s +11.07 ms / +0.6% (worse) 1.602 ms -89.5 us / -5.3% (better)
macOS cprintf 50944 B 0 B / +0.0% 4409 B 0 B / +0.0% 793.014 ms -352.8 us / -0.04447% (better) 3.082 ms +945.9 us / +44.3% (worse)
macOS cprintf-lto 50608 B 0 B / +0.0% 161 B 0 B / +0.0% 778.291 ms -54.12 ms / -6.5% (better) 2.102 ms +149.8 us / +7.7% (worse)
macOS fmtprintf 1232464 B 0 B / +0.0% 673877 B -124 B / -0.0184% (better) 3.600 s -542 ms / -13.1% (better) 4.143 ms +124.8 us / +3.1% (worse)
macOS fmtprintf-lto 871376 B 0 B / +0.0% 519617 B -588 B / -0.1% (better) 5.807 s -554.2 ms / -8.7% (better) 4.437 ms +537.8 us / +13.8% (worse)
macOS println 100624 B 0 B / +0.0% 26063 B -36 B / -0.1% (better) 838.698 ms +32.37 ms / +4.0% (worse) 3.426 ms +239.4 us / +7.5% (worse)
macOS println-lto 85680 B 0 B / +0.0% 22383 B -4 B / -0.01787% (better) 1.007 s -8.132 ms / -0.8% (better) 3.368 ms +453.3 us / +15.6% (worse)
Windows MinGW cprintf 744960 B +3072 B / +0.4% (worse) 4230 B 0 B / +0.0% 1.968 s -76.57 ms / -3.7% (better) 3.460 ms -42.1 us / -1.2% (better)
Windows MinGW cprintf-lto 55808 B 0 B / +0.0% 4182 B 0 B / +0.0% 1.996 s +21.64 ms / +1.1% (worse) 3.538 ms +106.5 us / +3.1% (worse)
Windows MinGW fmtprintf 5147136 B +2048 B / +0.0398% (worse) 360086 B -240 B / -0.1% (better) 6.547 s +43.08 ms / +0.7% (worse) 10.162 ms +794.2 us / +8.5% (worse)
Windows MinGW fmtprintf-lto 2787840 B +22528 B / +0.8% (worse) 305254 B -1344 B / -0.4% (better) 10.711 s +69.58 ms / +0.7% (worse) 9.200 ms -2.22 ms / -19.4% (better)
Windows MinGW println 806912 B +2560 B / +0.3% (worse) 27110 B -32 B / -0.1% (better) 1.944 s +10.47 ms / +0.5% (worse) 6.336 ms -952.3 us / -13.1% (better)
Windows MinGW println-lto 230912 B -1024 B / -0.4% (better) 22470 B 0 B / +0.0% 2.273 s +58.14 ms / +2.6% (worse) 6.532 ms +32.9 us / +0.5% (worse)
Windows MinGW 386 cprintf 752128 B +2048 B / +0.3% (worse) 22438 B -32 B / -0.1% (better) 2.030 s -94.89 ms / -4.5% (better) 9.828 ms -407.4 us / -4.0% (better)
Windows MinGW 386 cprintf-lto 282112 B +512 B / +0.2% (worse) 19514 B -24 B / -0.1% (better) 2.403 s -24.59 ms / -1.0% (better) 10.397 ms +299.4 us / +3.0% (worse)
Windows MinGW 386 fmtprintf 4504064 B +2560 B / +0.1% (worse) 283904 B -160 B / -0.1% (better) 7.058 s -188.8 ms / -2.6% (better) 15.128 ms +1.137 ms / +8.1% (worse)
Windows MinGW 386 fmtprintf-lto 2906624 B +13312 B / +0.5% (worse) 255446 B -804 B / -0.3% (better) 11.467 s -302 ms / -2.6% (better) 13.032 ms -5.202 ms / -28.5% (better)
Windows MinGW 386 println 751104 B +2048 B / +0.3% (worse) 22384 B -32 B / -0.1% (better) 2.041 s -29.65 ms / -1.4% (better) 10.051 ms +339.4 us / +3.5% (worse)
Windows MinGW 386 println-lto 280064 B 0 B / +0.0% 19448 B -24 B / -0.1% (better) 2.331 s -82.63 ms / -3.4% (better) 9.275 ms -677.3 us / -6.8% (better)
Windows MinGW ARM64 cprintf 755200 B +4608 B / +0.6% (worse) 4028 B 0 B / +0.0% 2.015 s -5.634 ms / -0.3% (better) 5.896 ms -106.1 us / -1.8% (better)
Windows MinGW ARM64 cprintf-lto 55296 B 0 B / +0.0% 3984 B 0 B / +0.0% 2.049 s -18.16 ms / -0.9% (better) 6.152 ms +156.9 us / +2.6% (worse)
Windows MinGW ARM64 fmtprintf 5092864 B +4608 B / +0.1% (worse) 300940 B -112 B / -0.0372% (better) 6.089 s +685.6 us / +0.01126% (worse) 12.704 ms -754.3 us / -5.6% (better)
Windows MinGW ARM64 fmtprintf-lto 2849792 B +24064 B / +0.9% (worse) 257012 B -444 B / -0.2% (better) 9.594 s -66.19 ms / -0.7% (better) 13.241 ms +162.4 us / +1.2% (worse)
Windows MinGW ARM64 println 815616 B +4608 B / +0.6% (worse) 25264 B -36 B / -0.1% (better) 2.032 s -7.841 ms / -0.4% (better) 10.035 ms -545.1 us / -5.2% (better)
Windows MinGW ARM64 println-lto 236544 B +512 B / +0.2% (worse) 21688 B -8 B / -0.03687% (better) 2.298 s -6.852 ms / -0.3% (better) 9.885 ms -658.8 us / -6.2% (better)
Windows MSVC cprintf 989696 B +3584 B / +0.4% (worse) 66003 B 0 B / +0.0% 2.151 s +197.1 ms / +10.1% (worse) 3.407 ms -545.3 us / -13.8% (better)
Windows MSVC cprintf-lto 303616 B 0 B / +0.0% 65971 B 0 B / +0.0% 1.969 s -32.07 ms / -1.6% (better) 3.939 ms +77.9 us / +2.0% (worse)
Windows MSVC fmtprintf 5446656 B +2048 B / +0.03762% (worse) 456166 B -224 B / -0.04908% (better) 6.764 s +70.1 ms / +1.0% (worse) 12.544 ms -72.6 us / -0.6% (better)
Windows MSVC fmtprintf-lto 3110912 B +19968 B / +0.6% (worse) 403638 B -1360 B / -0.3% (better) 10.705 s +24.07 ms / +0.2% (worse) 13.036 ms +1.376 ms / +11.8% (worse)
Windows MSVC println 1121792 B +3072 B / +0.3% (worse) 123254 B -32 B / -0.02596% (better) 1.967 s +21.75 ms / +1.1% (worse) 8.379 ms +768.8 us / +10.1% (worse)
Windows MSVC println-lto 552960 B -1024 B / -0.2% (better) 119270 B -16 B / -0.01341% (better) 2.261 s -10.71 ms / -0.5% (better) 8.284 ms +484.5 us / +6.2% (worse)
Windows MSVC 386 cprintf 662016 B +3072 B / +0.5% (worse) 21118 B -32 B / -0.2% (better) 1.562 s -5.669 ms / -0.4% (better) 9.759 ms +622.4 us / +6.8% (worse)
Windows MSVC 386 cprintf-lto 221696 B +512 B / +0.2% (worse) 18943 B -16 B / -0.1% (better) 1.826 s -5.903 ms / -0.3% (better) 8.850 ms -1.081 ms / -10.9% (better)
Windows MSVC 386 fmtprintf 4231168 B +3072 B / +0.1% (worse) 267362 B -160 B / -0.1% (better) 5.373 s +9.928 ms / +0.2% (worse) 11.816 ms -2 us / -0.01692% (better)
Windows MSVC 386 fmtprintf-lto 2717696 B +12288 B / +0.5% (worse) 235137 B -864 B / -0.4% (better) 8.520 s +37.11 ms / +0.4% (worse) 12.035 ms +394.4 us / +3.4% (worse)
Windows MSVC 386 println 660480 B +3584 B / +0.5% (worse) 21064 B -32 B / -0.2% (better) 1.573 s -1.373 ms / -0.1% (better) 8.569 ms -551.3 us / -6.0% (better)
Windows MSVC 386 println-lto 220160 B +512 B / +0.2% (worse) 18857 B -32 B / -0.2% (better) 1.805 s -4.412 ms / -0.2% (better) 8.631 ms -789.3 us / -8.4% (better)
Windows MSVC ARM64 cprintf 757760 B +4608 B / +0.6% (worse) 4240 B 0 B / +0.0% 1.853 s +16.76 ms / +0.9% (worse) 6.029 ms -427.4 us / -6.6% (better)
Windows MSVC ARM64 cprintf-lto 60928 B 0 B / +0.0% 4140 B 0 B / +0.0% 1.868 s +13.42 ms / +0.7% (worse) 6.383 ms +400.5 us / +6.7% (worse)
Windows MSVC ARM64 fmtprintf 5089280 B +4608 B / +0.1% (worse) 301284 B -112 B / -0.03716% (better) 5.809 s -62.12 ms / -1.1% (better) 13.681 ms -47.5 us / -0.3% (better)
Windows MSVC ARM64 fmtprintf-lto 2858496 B +24576 B / +0.9% (worse) 257952 B -448 B / -0.2% (better) 9.224 s +36.98 ms / +0.4% (worse) 14.501 ms +66.3 us / +0.5% (worse)
Windows MSVC ARM64 println 819200 B +4608 B / +0.6% (worse) 25772 B -32 B / -0.1% (better) 1.833 s -2.084 ms / -0.1% (better) 10.810 ms -26.7 us / -0.2% (better)
Windows MSVC ARM64 println-lto 242688 B +512 B / +0.2% (worse) 22240 B 0 B / +0.0% 2.087 s +8.141 ms / +0.4% (worse) 10.958 ms -110.9 us / -1.0% (better)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 14.690 ns/op +0.09 ns/op / +0.6% (worse)
Linux BenchmarkMergeCompilerFlags 201.700 ns/op +2.1 ns/op / +1.1% (worse)
Linux BenchmarkMergeLinkerFlags 137.600 ns/op +1.7 ns/op / +1.3% (worse)
Linux BenchmarkChannelBuffered 72.230 ns/op -0.53 ns/op / -0.7% (better)
Linux BenchmarkChannelHandoff 13401 ns/op -210 ns/op / -1.5% (better)
Linux BenchmarkDefer 15.360 ns/op -1.87 ns/op / -10.9% (better)
Linux BenchmarkDirectCall 1.177 ns/op -0.379 ns/op / -24.4% (better)
Linux BenchmarkGlobalRead 1.168 ns/op -0.399 ns/op / -25.5% (better)
Linux BenchmarkGlobalWrite 7.764 ns/op -0.079 ns/op / -1.0% (better)
Linux BenchmarkGoroutine 22985 ns/op -149 ns/op / -0.6% (better)
Linux BenchmarkInterfaceCall 5.152 ns/op +0.423 ns/op / +8.9% (worse)
Linux BenchmarkRuntimeGetG 2.442 ns/op -0.012 ns/op / -0.5% (better)
macOS BenchmarkLookupPCRandom 11.170 ns/op -2.81 ns/op / -20.1% (better)
macOS BenchmarkMergeCompilerFlags 99.300 ns/op -4.3 ns/op / -4.2% (better)
macOS BenchmarkMergeLinkerFlags 63.110 ns/op -23.22 ns/op / -26.9% (better)
macOS BenchmarkChannelBuffered 22.220 ns/op -2.71 ns/op / -10.9% (better)
macOS BenchmarkChannelHandoff 9458 ns/op +2225 ns/op / +30.8% (worse)
macOS BenchmarkDefer 10.300 ns/op -0.77 ns/op / -7.0% (better)
macOS BenchmarkDirectCall 0.870 ns/op -0.118 ns/op / -11.9% (better)
macOS BenchmarkGlobalRead 0.929 ns/op -0.022 ns/op / -2.3% (better)
macOS BenchmarkGlobalWrite 0.924 ns/op -0.0331 ns/op / -3.5% (better)
macOS BenchmarkGoroutine 30706 ns/op -11898 ns/op / -27.9% (better)
macOS BenchmarkInterfaceCall 2.885 ns/op -0.307 ns/op / -9.6% (better)
macOS BenchmarkRuntimeGetG 2.037 ns/op -0.179 ns/op / -8.1% (better)
Windows MinGW BenchmarkLookupPCRandom 13.050 ns/op +0.19 ns/op / +1.5% (worse)
Windows MinGW BenchmarkMergeCompilerFlags 627.600 ns/op -7 ns/op / -1.1% (better)
Windows MinGW BenchmarkMergeLinkerFlags 551.600 ns/op +1.9 ns/op / +0.3% (worse)
Windows MinGW BenchmarkChannelBuffered 35.080 ns/op -5.49 ns/op / -13.5% (better)
Windows MinGW BenchmarkChannelHandoff 1163 ns/op -93 ns/op / -7.4% (better)
Windows MinGW BenchmarkDefer 15.300 ns/op +0.4 ns/op / +2.7% (worse)
Windows MinGW BenchmarkDirectCall 1.547 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW BenchmarkGlobalRead 1.861 ns/op +0.003 ns/op / +0.2% (worse)
Windows MinGW BenchmarkGlobalWrite 2.458 ns/op +0.001 ns/op / +0.0407% (worse)
Windows MinGW BenchmarkGoroutine 89696 ns/op -5487 ns/op / -5.8% (better)
Windows MinGW BenchmarkInterfaceCall 7.143 ns/op -0.3 ns/op / -4.0% (better)
Windows MinGW BenchmarkRuntimeGetG 2.172 ns/op 0 ns/op / +0.0%
Windows MinGW 386 BenchmarkLookupPCRandom 68.740 ns/op -0.18 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkMergeCompilerFlags 898.100 ns/op -9.4 ns/op / -1.0% (better)
Windows MinGW 386 BenchmarkMergeLinkerFlags 855.100 ns/op -11.5 ns/op / -1.3% (better)
Windows MinGW 386 BenchmarkChannelBuffered 64.750 ns/op +0.28 ns/op / +0.4% (worse)
Windows MinGW 386 BenchmarkChannelHandoff 7551 ns/op +2741 ns/op / +57.0% (worse)
Windows MinGW 386 BenchmarkDefer 16.770 ns/op -0.17 ns/op / -1.0% (better)
Windows MinGW 386 BenchmarkDirectCall 0.941 ns/op -0.011 ns/op / -1.2% (better)
Windows MinGW 386 BenchmarkGlobalRead 1.164 ns/op +0.004 ns/op / +0.3% (worse)
Windows MinGW 386 BenchmarkGlobalWrite 16.150 ns/op 0 ns/op / +0.0%
Windows MinGW 386 BenchmarkGoroutine 235306 ns/op +24946 ns/op / +11.9% (worse)
Windows MinGW 386 BenchmarkInterfaceCall 5.958 ns/op +0.037 ns/op / +0.6% (worse)
Windows MinGW 386 BenchmarkRuntimeGetG 2.035 ns/op +0.006 ns/op / +0.3% (worse)
Windows MinGW ARM64 BenchmarkLookupPCRandom 12.090 ns/op -0.08 ns/op / -0.7% (better)
Windows MinGW ARM64 BenchmarkMergeCompilerFlags 554.500 ns/op -9.2 ns/op / -1.6% (better)
Windows MinGW ARM64 BenchmarkMergeLinkerFlags 528.100 ns/op +12.7 ns/op / +2.5% (worse)
Windows MinGW ARM64 BenchmarkChannelBuffered 42.590 ns/op +0.68 ns/op / +1.6% (worse)
Windows MinGW ARM64 BenchmarkChannelHandoff 3916 ns/op +259 ns/op / +7.1% (worse)
Windows MinGW ARM64 BenchmarkDefer 11.800 ns/op -0.5 ns/op / -4.1% (better)
Windows MinGW ARM64 BenchmarkDirectCall 0.589 ns/op -0.0003 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkGlobalRead 0.666 ns/op -0.0007 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkGlobalWrite 0.663 ns/op +0.0001 ns/op / +0.01508% (worse)
Windows MinGW ARM64 BenchmarkGoroutine 56211 ns/op +402 ns/op / +0.7% (worse)
Windows MinGW ARM64 BenchmarkInterfaceCall 3.975 ns/op +0.016 ns/op / +0.4% (worse)
Windows MinGW ARM64 BenchmarkRuntimeGetG 1.796 ns/op +0.026 ns/op / +1.5% (worse)
Windows MSVC BenchmarkLookupPCRandom 11.120 ns/op +0.08 ns/op / +0.7% (worse)
Windows MSVC BenchmarkMergeCompilerFlags 650.700 ns/op +29.5 ns/op / +4.7% (worse)
Windows MSVC BenchmarkMergeLinkerFlags 562.500 ns/op -9.6 ns/op / -1.7% (better)
Windows MSVC BenchmarkChannelBuffered 53.980 ns/op +0.01 ns/op / +0.01853% (worse)
Windows MSVC BenchmarkChannelHandoff 2434 ns/op -167 ns/op / -6.4% (better)
Windows MSVC BenchmarkDefer 13.300 ns/op +0.72 ns/op / +5.7% (worse)
Windows MSVC BenchmarkDirectCall 1.156 ns/op -0.002 ns/op / -0.2% (better)
Windows MSVC BenchmarkGlobalRead 0.866 ns/op -0.0018 ns/op / -0.2% (better)
Windows MSVC BenchmarkGlobalWrite 6.045 ns/op -0.012 ns/op / -0.2% (better)
Windows MSVC BenchmarkGoroutine 85383 ns/op +8932 ns/op / +11.7% (worse)
Windows MSVC BenchmarkInterfaceCall 4.998 ns/op +0.019 ns/op / +0.4% (worse)
Windows MSVC BenchmarkRuntimeGetG 2.136 ns/op -0.008 ns/op / -0.4% (better)
Windows MSVC 386 BenchmarkLookupPCRandom 60.930 ns/op -0.7 ns/op / -1.1% (better)
Windows MSVC 386 BenchmarkMergeCompilerFlags 672.500 ns/op -5.7 ns/op / -0.8% (better)
Windows MSVC 386 BenchmarkMergeLinkerFlags 639.300 ns/op +34.9 ns/op / +5.8% (worse)
Windows MSVC 386 BenchmarkChannelBuffered 59.010 ns/op +0.37 ns/op / +0.6% (worse)
Windows MSVC 386 BenchmarkChannelHandoff 2154 ns/op +541 ns/op / +33.5% (worse)
Windows MSVC 386 BenchmarkDefer 10.910 ns/op -0.28 ns/op / -2.5% (better)
Windows MSVC 386 BenchmarkDirectCall 0.929 ns/op +0.0061 ns/op / +0.7% (worse)
Windows MSVC 386 BenchmarkGlobalRead 1.151 ns/op -0.002 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkGlobalWrite 14.950 ns/op -0.13 ns/op / -0.9% (better)
Windows MSVC 386 BenchmarkGoroutine 84088 ns/op +378 ns/op / +0.5% (worse)
Windows MSVC 386 BenchmarkInterfaceCall 4.016 ns/op +0.288 ns/op / +7.7% (worse)
Windows MSVC 386 BenchmarkRuntimeGetG 1.159 ns/op -0.056 ns/op / -4.6% (better)
Windows MSVC ARM64 BenchmarkLookupPCRandom 12.150 ns/op +0.02 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkMergeCompilerFlags 568.400 ns/op +14.6 ns/op / +2.6% (worse)
Windows MSVC ARM64 BenchmarkMergeLinkerFlags 529.600 ns/op +4.3 ns/op / +0.8% (worse)
Windows MSVC ARM64 BenchmarkChannelBuffered 45.450 ns/op -0.21 ns/op / -0.5% (better)
Windows MSVC ARM64 BenchmarkChannelHandoff 2386 ns/op -80 ns/op / -3.2% (better)
Windows MSVC ARM64 BenchmarkDefer 11.790 ns/op -0.33 ns/op / -2.7% (better)
Windows MSVC ARM64 BenchmarkDirectCall 0.590 ns/op +0.0003 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkGlobalRead 0.664 ns/op +0.0005 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkGlobalWrite 3.794 ns/op -0.001 ns/op / -0.02635% (better)
Windows MSVC ARM64 BenchmarkGoroutine 52803 ns/op -1787 ns/op / -3.3% (better)
Windows MSVC ARM64 BenchmarkInterfaceCall 3.875 ns/op +0.004 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkRuntimeGetG 1.814 ns/op +0.013 ns/op / +0.7% (worse)
Timer runtime benchmarks
Platform Operation and runtime ns/op vs base
Linux AfterFuncZeroDelivery/Go 903.500 ns/op -7.5 ns/op / -0.8% (better)
Linux AfterFuncZeroDelivery/LLGo 45443 ns/op -2803 ns/op / -5.8% (better)
Linux CreateStop/Go 290.900 ns/op -4.2 ns/op / -1.4% (better)
Linux CreateStop/LLGo 1431 ns/op +26 ns/op / +1.9% (worse)
Linux RearmStopped/Go 116.200 ns/op -0.1 ns/op / -0.1% (better)
Linux RearmStopped/LLGo 877.300 ns/op +48.3 ns/op / +5.8% (worse)
Linux ResetActive/Go 68.770 ns/op -0.27 ns/op / -0.4% (better)
Linux ResetActive/LLGo 629.400 ns/op -5.6 ns/op / -0.9% (better)
Linux ResetHeap1024/Go 67.150 ns/op -0.05 ns/op / -0.1% (better)
Linux ResetHeap1024/LLGo 132.900 ns/op +1.5 ns/op / +1.1% (worse)
macOS AfterFuncZeroDelivery/Go 401.400 ns/op -38.4 ns/op / -8.7% (better)
macOS AfterFuncZeroDelivery/LLGo 55101 ns/op -3853 ns/op / -6.5% (better)
macOS CreateStop/Go 125.900 ns/op -23.9 ns/op / -16.0% (better)
macOS CreateStop/LLGo 361.300 ns/op -99.3 ns/op / -21.6% (better)
macOS RearmStopped/Go 61.010 ns/op +0.65 ns/op / +1.1% (worse)
macOS RearmStopped/LLGo 259.200 ns/op -5.5 ns/op / -2.1% (better)
macOS ResetActive/Go 38.560 ns/op -6.16 ns/op / -13.8% (better)
macOS ResetActive/LLGo 146.400 ns/op -0.4 ns/op / -0.3% (better)
macOS ResetHeap1024/Go 43.040 ns/op -0.69 ns/op / -1.6% (better)
macOS ResetHeap1024/LLGo 63.130 ns/op -2.37 ns/op / -3.6% (better)
Windows MinGW AfterFuncZeroDelivery/Go 528.900 ns/op -14.2 ns/op / -2.6% (better)
Windows MinGW AfterFuncZeroDelivery/LLGo 186697 ns/op +254 ns/op / +0.1% (worse)
Windows MinGW CreateStop/Go 115.400 ns/op -2.3 ns/op / -2.0% (better)
Windows MinGW CreateStop/LLGo 659.800 ns/op +40.4 ns/op / +6.5% (worse)
Windows MinGW RearmStopped/Go 31.520 ns/op +0.13 ns/op / +0.4% (worse)
Windows MinGW RearmStopped/LLGo 255.300 ns/op +22.5 ns/op / +9.7% (worse)
Windows MinGW ResetActive/Go 20.140 ns/op +0.13 ns/op / +0.6% (worse)
Windows MinGW ResetActive/LLGo 181.400 ns/op -250.9 ns/op / -58.0% (better)
Windows MinGW ResetHeap1024/Go 20.400 ns/op -0.03 ns/op / -0.1% (better)
Windows MinGW ResetHeap1024/LLGo 102.500 ns/op -4.5 ns/op / -4.2% (better)
Windows MinGW 386 AfterFuncZeroDelivery/Go 1125 ns/op -8 ns/op / -0.7% (better)
Windows MinGW 386 AfterFuncZeroDelivery/LLGo 268988 ns/op +7792 ns/op / +3.0% (worse)
Windows MinGW 386 CreateStop/Go 276.800 ns/op +0.4 ns/op / +0.1% (worse)
Windows MinGW 386 CreateStop/LLGo 1047 ns/op -34 ns/op / -3.1% (better)
Windows MinGW 386 RearmStopped/Go 92.570 ns/op +0.09 ns/op / +0.1% (worse)
Windows MinGW 386 RearmStopped/LLGo 708.800 ns/op -9.2 ns/op / -1.3% (better)
Windows MinGW 386 ResetActive/Go 45.990 ns/op -0.08 ns/op / -0.2% (better)
Windows MinGW 386 ResetActive/LLGo 437.600 ns/op -69.1 ns/op / -13.6% (better)
Windows MinGW 386 ResetHeap1024/Go 46.450 ns/op 0 ns/op / +0.0%
Windows MinGW 386 ResetHeap1024/LLGo 137.100 ns/op -0.4 ns/op / -0.3% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/Go 666.800 ns/op -3.1 ns/op / -0.5% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/LLGo 135171 ns/op +2701 ns/op / +2.0% (worse)
Windows MinGW ARM64 CreateStop/Go 203.200 ns/op +7.2 ns/op / +3.7% (worse)
Windows MinGW ARM64 CreateStop/LLGo 332.800 ns/op -15.1 ns/op / -4.3% (better)
Windows MinGW ARM64 RearmStopped/Go 70.560 ns/op -0.03 ns/op / -0.0425% (better)
Windows MinGW ARM64 RearmStopped/LLGo 159.300 ns/op -1.8 ns/op / -1.1% (better)
Windows MinGW ARM64 ResetActive/Go 30.940 ns/op -0.01 ns/op / -0.03231% (better)
Windows MinGW ARM64 ResetActive/LLGo 94.900 ns/op +7.48 ns/op / +8.6% (worse)
Windows MinGW ARM64 ResetHeap1024/Go 31.040 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 ResetHeap1024/LLGo 92.630 ns/op +0.33 ns/op / +0.4% (worse)
Windows MSVC AfterFuncZeroDelivery/Go 653.500 ns/op -2.5 ns/op / -0.4% (better)
Windows MSVC AfterFuncZeroDelivery/LLGo 155215 ns/op -5090 ns/op / -3.2% (better)
Windows MSVC CreateStop/Go 185.500 ns/op +1 ns/op / +0.5% (worse)
Windows MSVC CreateStop/LLGo 873.700 ns/op +275.6 ns/op / +46.1% (worse)
Windows MSVC RearmStopped/Go 68.300 ns/op -0.11 ns/op / -0.2% (better)
Windows MSVC RearmStopped/LLGo 237.100 ns/op -5.2 ns/op / -2.1% (better)
Windows MSVC ResetActive/Go 30.230 ns/op +0.01 ns/op / +0.03309% (worse)
Windows MSVC ResetActive/LLGo 194.300 ns/op +30.9 ns/op / +18.9% (worse)
Windows MSVC ResetHeap1024/Go 30.360 ns/op +0.13 ns/op / +0.4% (worse)
Windows MSVC ResetHeap1024/LLGo 93.390 ns/op +1.94 ns/op / +2.1% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/Go 878.500 ns/op -2.1 ns/op / -0.2% (better)
Windows MSVC 386 AfterFuncZeroDelivery/LLGo 171006 ns/op +3768 ns/op / +2.3% (worse)
Windows MSVC 386 CreateStop/Go 223.900 ns/op +4.2 ns/op / +1.9% (worse)
Windows MSVC 386 CreateStop/LLGo 709 ns/op -257.3 ns/op / -26.6% (better)
Windows MSVC 386 RearmStopped/Go 81.400 ns/op +0.17 ns/op / +0.2% (worse)
Windows MSVC 386 RearmStopped/LLGo 382.300 ns/op +41 ns/op / +12.0% (worse)
Windows MSVC 386 ResetActive/Go 39.370 ns/op -0.49 ns/op / -1.2% (better)
Windows MSVC 386 ResetActive/LLGo 287 ns/op -4.1 ns/op / -1.4% (better)
Windows MSVC 386 ResetHeap1024/Go 39.540 ns/op -0.03 ns/op / -0.1% (better)
Windows MSVC 386 ResetHeap1024/LLGo 113.300 ns/op +1.2 ns/op / +1.1% (worse)
Windows MSVC ARM64 AfterFuncZeroDelivery/Go 664.500 ns/op -10.9 ns/op / -1.6% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/LLGo 133314 ns/op +339 ns/op / +0.3% (worse)
Windows MSVC ARM64 CreateStop/Go 199 ns/op +5.8 ns/op / +3.0% (worse)
Windows MSVC ARM64 CreateStop/LLGo 351.300 ns/op +25.9 ns/op / +8.0% (worse)
Windows MSVC ARM64 RearmStopped/Go 70.640 ns/op +0.03 ns/op / +0.04249% (worse)
Windows MSVC ARM64 RearmStopped/LLGo 170.500 ns/op +1.4 ns/op / +0.8% (worse)
Windows MSVC ARM64 ResetActive/Go 31 ns/op -0.01 ns/op / -0.03225% (better)
Windows MSVC ARM64 ResetActive/LLGo 106.900 ns/op -2.2 ns/op / -2.0% (better)
Windows MSVC ARM64 ResetHeap1024/Go 31.060 ns/op +0.04 ns/op / +0.1% (worse)
Windows MSVC ARM64 ResetHeap1024/LLGo 91.730 ns/op -0.6 ns/op / -0.6% (better)

Compared with f4f1d75b62cc measured in the same runner job.

@cpunion cpunion left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2e2783d. I found no blocking correctness issues.

The string header is borrowed synchronously by the hasher; the empty-key and stored-key paths retain their existing semantics. The slice checks preserve the upper-to-lower ordering: after checking against nonnegative cap, each subsequent bound is known to fit int before conversion. Signedness is still retained for panic formatting, including negative signed and high-bit unsigned indices.

Validation performed with a compiler built from this head:

  • Native macOS/arm64: the four new string-map tests at O0/O2, plus the existing map and slice-bounds/panic-text regressions.
  • Emscripten32 and Memory64: the same four new string-map tests, copied unchanged into a temporary pure-Go test package to avoid the original package's platform-specific C declarations; Emscripten32 also passed the existing map and bounds regressions.
  • Extracted old/new slice checks: 279,000 boundary combinations produced identical results and panic arguments, covering signedness flags and 32/64-bit boundary values. This comparison is not a claim of native 32-bit CPU execution.

One non-blocking comment below clarifies the allocation benefit's platform scope.

Comment thread runtime/internal/runtime/map_faststr.go Resolved
@cpunion
cpunion merged commit e2cca2c into xgo-dev:main Nov 10, 2026
115 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants