Skip to content

fix(ssa): honor 32-bit Go alignment for basic values and arrays - #3025

Merged
cpunion merged 4 commits into
xgo-dev:mainfrom
zhouguangyuan0718:codex/fix-2809-go-access-alignment
Nov 10, 2026
Merged

cpunion merged 4 commits into
xgo-dev:mainfrom
zhouguangyuan0718:codex/fix-2809-go-access-alignment

Conversation

@zhouguangyuan0718

@zhouguangyuan0718 zhouguangyuan0718 commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

On 32-bit targets, ordinary Go pointers to basic values and arrays of basic values can have four-byte alignment, while LLVM assigns their storage types eight-byte alignment. This includes pointers escaping from struct fields and whole-array reads/writes of named or nested arrays.

Cap these ordinary load/store alignments at the Go word alignment. Unwrap array element types without changing struct layouts or the storage alignment of native, HostLayout, and SIMD structs. When an i64 load/store becomes atomic, retain its stronger eight-byte alignment contract so Windows/386 does not emit unresolved __atomic_load/__atomic_store helpers.

Validation passed locally with LLVM 22 on macOS/arm64:

  • 84 basic-value cases, 108 atomic/non-atomic cases, 154 array cases, and 24 Go-source array access checks. The added array regressions fail before the array fix and pass afterward, covering field/direct pointers, named/nested arrays, and native/HostLayout/SIMD/J32 controls.
  • Cross-target IR and object checks for Windows/386, Linux/386, ARM32 (GOARM=5/7), amd64, and arm64; J32 array storage is checked at the IR boundary. Windows COFF checks reject undefined atomic load/store helpers.
  • go test ./ssa ./ssa/abi ./cl ./internal/cabi -short -count=1 -timeout=15m.

Native Windows execution was not performed locally; hosted CI provides that validation.

Fixes #2809. Also covers the array accesses reported in review.

@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 summary

This is a well-targeted, minimal fix for the alignment mismatch in #2809: on 32-bit Go word targets, a FieldAddr-derived pointer to a 64-bit scalar (e.g. int64/float64, where LLVM's ABI alignment is 8) is only guaranteed 4-byte aligned, so the emitted load/store must not over-claim 8-byte alignment. The helper is placed consistently next to the existing SIMD/wide-pointer alignment handling, runs only on the plain-scalar path (after the vkSIMD and needsWidePointerStorage early returns), and only ever lowers alignment — which is always memory-safe and, if anything, removes a potential misaligned-access fault on strict-alignment 32-bit ARM configs.

Correctness, performance, and security all check out:

  • The guard GoWordSize() != 4 cheaply scopes the fix to 32-bit targets, and the 64-bit hot path returns immediately on a cached field read (no added cost on amd64/arm64).
  • AlignOf(typ) > GoWordSize() correctly leaves already-4-aligned scalars untouched and only weakens over-alignment, matching the "weaker alignment is still valid" reasoning.
  • The int(...) casts carry small power-of-two values; no truncation/overflow is reachable.
  • The test matrix is well chosen: it includes both linux/386 (LLVM already 4-aligns, helper is a no-op) and windows/386 (LLVM 8-aligns, helper actively lowers), plus 64-bit controls, and verifies both the direct-pointer and FieldAddr paths via VerifyModule + object emission.

Only two minor, non-blocking clarity nits are inline below. A couple of optional follow-ups: the map iteration over {"load","store"} is nondeterministic but harmless (independent checks, named diagnostics), and on 32-bit targets the per-access AlignOf makes an uncached LLVM ABITypeAlignment FFI call on every scalar Load/Store — well-bounded by the preceding *types.Basic filter, but cacheable (e.g. via the existing hostBasicLayouts table) if 32-bit compile time ever becomes a concern.

No blocking issues found.

Comment thread ssa/memory.go Outdated
// escape, so accesses must honor the Go pointer guarantee rather than relying
// on the alignment of the original allocation. Native pointers may be more
// aligned; the weaker alignment is still valid for those accesses.
func (b Builder) setGoScalarAccessAlignment(inst llvm.Value, typ Type) {

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.

Minor naming/scope nit (behavior is correct): the name setGoScalarAccessAlignment and the "scalar type" wording in the comment undersell what the *types.Basic guard actually matches. complex64/complex128 are also *types.Basic, and they lower to LLVM aggregate structs ({float,float} / {double,double}), not scalars — yet the helper does (correctly) fire for complex128 on windows/386, where its ABI alignment is 8 > 4. SetAlignment on an aggregate load/store is valid, so this is fine, but a future reader may wrongly assume complex types are excluded. Consider renaming to e.g. setGoBasicAccessAlignment / setGoValueAccessAlignment, or amending the comment to note it also covers complex basic types.

Comment thread ssa/memory.go Outdated
// A 32-bit Go scalar pointer may refer to a four-byte-aligned struct field,
// even when LLVM gives its scalar type eight-byte ABI alignment. FieldAddr can
// escape, so accesses must honor the Go pointer guarantee rather than relying
// on the alignment of the original allocation. Native pointers may be more

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.

Minor doc clarity: "Native pointers may be more aligned" is ambiguous. The *types.Basic guard means this helper never runs on pointer-typed Go values, and "native" collides with the codebase's own isNativeStorage/needsWidePointerStorage concepts. The intended meaning seems to be that the runtime address may happen to be more strongly aligned, and declaring only the Go-guaranteed 4-byte alignment is still correct because a more-aligned address trivially satisfies a weaker requirement. Suggest rephrasing to something like: "The underlying address may in fact be more strongly aligned at runtime; declaring only the Go-guaranteed alignment is still correct because a more-aligned pointer satisfies a weaker alignment requirement."

@codecov

codecov Bot commented Nov 8, 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 8, 2026 •

Copy link
Copy Markdown

LLGo WebAssembly build benchmarks

89a28ecc3b61 | 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 152419 B 0 B / +0.0% 88932 B 0 B / +0.0%
cprintf/j32-goos-js/LLGo 151369 B 0 B / +0.0% 72985 B 0 B / +0.0%
cprintf/j64-emscripten-memory64/LLGo 139893 B 0 B / +0.0% 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 1613481 B 0 B / +0.0% 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 1671939 B 0 B / +0.0% 89403 B 0 B / +0.0%
fmtprintf/j64-emscripten-memory64/LLGo 1502725 B 0 B / +0.0% 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 1059821 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/w32-wasi/LLGo 1060265 B 0 B / +0.0% 0 B 0 B / 0.0%
j32-emscripten/LLGo 151631 B 0 B / +0.0% 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 150836 B 0 B / +0.0% 72985 B 0 B / +0.0%
j64-emscripten-memory64/LLGo 139151 B 0 B / +0.0% 92103 B 0 B / +0.0%
reflectcall/j32-emscripten/LLGo 1346767 B 0 B / +0.0% 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 1361338 B 0 B / +0.0% 79673 B 0 B / +0.0%
reflectcall/j64-emscripten-memory64/LLGo 1234565 B 0 B / +0.0% 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 997992 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/w32-wasi/LLGo 998582 B 0 B / +0.0% 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 8.693 s -1.076 s / -11.0% (better)
j32-goos-js 9.037 s -72.35 ms / -0.8% (better)
j64-emscripten-memory64 8.059 s -887.2 ms / -9.9% (better)
reflectcall/w32-wasi 31.839 s +2.889 s / +10.0% (worse)
w32-goos-wasip1 4.401 s -658.6 ms / -13.0% (better)
w32-wasi 3.985 s -915 ms / -18.7% (better)

Compared with a87e123ec339 measured in the same runner job.

@zhouguangyuan0718
zhouguangyuan0718 force-pushed the codex/fix-2809-go-access-alignment branch from 1fa2faa to 111642a Compare November 8, 2026 23:45
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

LLGo baseline benchmarks

89a28ecc3b61 | workflow run | long-term charts

String equality benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkStringEquality/bytes/equal/1024/Go 25.760 ns/op -1.33 ns/op / -4.9% (better)
Linux BenchmarkStringEquality/bytes/equal/1024/LLGo 63.390 ns/op -8.54 ns/op / -11.9% (better)
Linux BenchmarkStringEquality/bytes/equal/128/Go 8.347 ns/op -0.647 ns/op / -7.2% (better)
Linux BenchmarkStringEquality/bytes/equal/128/LLGo 12.010 ns/op -0.26 ns/op / -2.1% (better)
Linux BenchmarkStringEquality/bytes/equal/8/Go 5.821 ns/op -0.153 ns/op / -2.6% (better)
Linux BenchmarkStringEquality/bytes/equal/8/LLGo 4.761 ns/op +0.03 ns/op / +0.6% (worse)
Linux BenchmarkStringEquality/bytes/first/1024/Go 6.619 ns/op -1.229 ns/op / -15.7% (better)
Linux BenchmarkStringEquality/bytes/first/1024/LLGo 3.117 ns/op -0.067 ns/op / -2.1% (better)
Linux BenchmarkStringEquality/bytes/first/128/Go 6.613 ns/op -0.043 ns/op / -0.6% (better)
Linux BenchmarkStringEquality/bytes/first/128/LLGo 3.147 ns/op -2.826 ns/op / -47.3% (better)
Linux BenchmarkStringEquality/bytes/first/8/Go 5.831 ns/op -0.239 ns/op / -3.9% (better)
Linux BenchmarkStringEquality/bytes/first/8/LLGo 3.111 ns/op -0.006 ns/op / -0.2% (better)
Linux BenchmarkStringEquality/bytes/last/1024/Go 25.100 ns/op -6.02 ns/op / -19.3% (better)
Linux BenchmarkStringEquality/bytes/last/1024/LLGo 63.540 ns/op -0.33 ns/op / -0.5% (better)
Linux BenchmarkStringEquality/bytes/last/128/Go 8.217 ns/op -0.195 ns/op / -2.3% (better)
Linux BenchmarkStringEquality/bytes/last/128/LLGo 14.400 ns/op +1.85 ns/op / +14.7% (worse)
Linux BenchmarkStringEquality/bytes/last/8/Go 5.816 ns/op -7.054 ns/op / -54.8% (better)
Linux BenchmarkStringEquality/bytes/last/8/LLGo 3.889 ns/op -0.054 ns/op / -1.4% (better)
Linux BenchmarkStringEquality/strings/equal/1024/Go 23.210 ns/op -16.97 ns/op / -42.2% (better)
Linux BenchmarkStringEquality/strings/equal/1024/LLGo 56.220 ns/op -5.99 ns/op / -9.6% (better)
Linux BenchmarkStringEquality/strings/equal/128/Go 8.230 ns/op -5.07 ns/op / -38.1% (better)
Linux BenchmarkStringEquality/strings/equal/128/LLGo 12.050 ns/op -2.34 ns/op / -16.3% (better)
Linux BenchmarkStringEquality/strings/equal/8/Go 5.850 ns/op -0.075 ns/op / -1.3% (better)
Linux BenchmarkStringEquality/strings/equal/8/LLGo 4.371 ns/op -0.376 ns/op / -7.9% (better)
Linux BenchmarkStringEquality/strings/first/1024/Go 6.602 ns/op -0.082 ns/op / -1.2% (better)
Linux BenchmarkStringEquality/strings/first/1024/LLGo 2.729 ns/op -0.025 ns/op / -0.9% (better)
Linux BenchmarkStringEquality/strings/first/128/Go 6.612 ns/op -0.094 ns/op / -1.4% (better)
Linux BenchmarkStringEquality/strings/first/128/LLGo 2.725 ns/op -0.013 ns/op / -0.5% (better)
Linux BenchmarkStringEquality/strings/first/8/Go 5.817 ns/op -0.31 ns/op / -5.1% (better)
Linux BenchmarkStringEquality/strings/first/8/LLGo 2.726 ns/op -0.009 ns/op / -0.3% (better)
Linux BenchmarkStringEquality/strings/last/1024/Go 23.050 ns/op -10.77 ns/op / -31.8% (better)
Linux BenchmarkStringEquality/strings/last/1024/LLGo 56.220 ns/op -0.52 ns/op / -0.9% (better)
Linux BenchmarkStringEquality/strings/last/128/Go 8.135 ns/op -0.043 ns/op / -0.5% (better)
Linux BenchmarkStringEquality/strings/last/128/LLGo 11.750 ns/op -0.06 ns/op / -0.5% (better)
Linux BenchmarkStringEquality/strings/last/8/Go 5.814 ns/op -1.073 ns/op / -15.6% (better)
Linux BenchmarkStringEquality/strings/last/8/LLGo 3.554 ns/op -0.059 ns/op / -1.6% (better)
macOS BenchmarkStringEquality/bytes/equal/1024/Go 23.360 ns/op -2.03 ns/op / -8.0% (better)
macOS BenchmarkStringEquality/bytes/equal/1024/LLGo 25.130 ns/op -1.79 ns/op / -6.6% (better)
macOS BenchmarkStringEquality/bytes/equal/128/Go 5.422 ns/op -1.108 ns/op / -17.0% (better)
macOS BenchmarkStringEquality/bytes/equal/128/LLGo 5.044 ns/op -1.275 ns/op / -20.2% (better)
macOS BenchmarkStringEquality/bytes/equal/8/Go 3.230 ns/op -0.602 ns/op / -15.7% (better)
macOS BenchmarkStringEquality/bytes/equal/8/LLGo 4.407 ns/op +1.584 ns/op / +56.1% (worse)
macOS BenchmarkStringEquality/bytes/first/1024/Go 3.441 ns/op -0.489 ns/op / -12.4% (better)
macOS BenchmarkStringEquality/bytes/first/1024/LLGo 1.774 ns/op -0.338 ns/op / -16.0% (better)
macOS BenchmarkStringEquality/bytes/first/128/Go 3.741 ns/op -0.234 ns/op / -5.9% (better)
macOS BenchmarkStringEquality/bytes/first/128/LLGo 1.928 ns/op -0.35 ns/op / -15.4% (better)
macOS BenchmarkStringEquality/bytes/first/8/Go 3.418 ns/op -0.655 ns/op / -16.1% (better)
macOS BenchmarkStringEquality/bytes/first/8/LLGo 1.861 ns/op -0.278 ns/op / -13.0% (better)
macOS BenchmarkStringEquality/bytes/last/1024/Go 23.140 ns/op -6.87 ns/op / -22.9% (better)
macOS BenchmarkStringEquality/bytes/last/1024/LLGo 23.320 ns/op -4.04 ns/op / -14.8% (better)
macOS BenchmarkStringEquality/bytes/last/128/Go 5.013 ns/op -0.812 ns/op / -13.9% (better)
macOS BenchmarkStringEquality/bytes/last/128/LLGo 4.463 ns/op -0.102 ns/op / -2.2% (better)
macOS BenchmarkStringEquality/bytes/last/8/Go 3.355 ns/op -0.723 ns/op / -17.7% (better)
macOS BenchmarkStringEquality/bytes/last/8/LLGo 2.673 ns/op +0.088 ns/op / +3.4% (worse)
macOS BenchmarkStringEquality/strings/equal/1024/Go 23.640 ns/op -5.61 ns/op / -19.2% (better)
macOS BenchmarkStringEquality/strings/equal/1024/LLGo 25.660 ns/op -4.31 ns/op / -14.4% (better)
macOS BenchmarkStringEquality/strings/equal/128/Go 5.166 ns/op -2.59 ns/op / -33.4% (better)
macOS BenchmarkStringEquality/strings/equal/128/LLGo 4.644 ns/op -2.22 ns/op / -32.3% (better)
macOS BenchmarkStringEquality/strings/equal/8/Go 3.477 ns/op -0.384 ns/op / -9.9% (better)
macOS BenchmarkStringEquality/strings/equal/8/LLGo 3.553 ns/op +0.699 ns/op / +24.5% (worse)
macOS BenchmarkStringEquality/strings/first/1024/Go 3.456 ns/op -1.902 ns/op / -35.5% (better)
macOS BenchmarkStringEquality/strings/first/1024/LLGo 1.812 ns/op -0.137 ns/op / -7.0% (better)
macOS BenchmarkStringEquality/strings/first/128/Go 3.548 ns/op -0.541 ns/op / -13.2% (better)
macOS BenchmarkStringEquality/strings/first/128/LLGo 2.183 ns/op -0.172 ns/op / -7.3% (better)
macOS BenchmarkStringEquality/strings/first/8/Go 3.425 ns/op -0.142 ns/op / -4.0% (better)
macOS BenchmarkStringEquality/strings/first/8/LLGo 1.885 ns/op +0.207 ns/op / +12.3% (worse)
macOS BenchmarkStringEquality/strings/last/1024/Go 22.760 ns/op -6.2 ns/op / -21.4% (better)
macOS BenchmarkStringEquality/strings/last/1024/LLGo 24.530 ns/op -2.24 ns/op / -8.4% (better)
macOS BenchmarkStringEquality/strings/last/128/Go 4.927 ns/op -0.577 ns/op / -10.5% (better)
macOS BenchmarkStringEquality/strings/last/128/LLGo 5.302 ns/op +0.729 ns/op / +15.9% (worse)
macOS BenchmarkStringEquality/strings/last/8/Go 3.385 ns/op -2.003 ns/op / -37.2% (better)
macOS BenchmarkStringEquality/strings/last/8/LLGo 2.534 ns/op -0.161 ns/op / -6.0% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/1024/Go 15.470 ns/op +3.33 ns/op / +27.4% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/1024/LLGo 21.270 ns/op +0.05 ns/op / +0.2% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/128/Go 4.746 ns/op +1.042 ns/op / +28.1% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/128/LLGo 4.970 ns/op +0.147 ns/op / +3.0% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/8/Go 4.169 ns/op -1.825 ns/op / -30.4% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/8/LLGo 2.254 ns/op -0.395 ns/op / -14.9% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/1024/Go 3.827 ns/op -0.159 ns/op / -4.0% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/1024/LLGo 1.932 ns/op -0.149 ns/op / -7.2% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/128/Go 3.999 ns/op +0.217 ns/op / +5.7% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/128/LLGo 2.310 ns/op +0.323 ns/op / +16.3% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/8/Go 4.003 ns/op +0.466 ns/op / +13.2% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/8/LLGo 1.783 ns/op -0.205 ns/op / -10.3% (better)
Windows MinGW BenchmarkStringEquality/bytes/last/1024/Go 11.970 ns/op +1.78 ns/op / +17.5% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/1024/LLGo 22.370 ns/op +0.41 ns/op / +1.9% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/128/Go 4.492 ns/op +0.437 ns/op / +10.8% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/128/LLGo 5.053 ns/op +0.11 ns/op / +2.2% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/8/Go 3.716 ns/op +0.116 ns/op / +3.2% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/8/LLGo 2.211 ns/op +0.048 ns/op / +2.2% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/1024/Go 13.440 ns/op +2.63 ns/op / +24.3% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/1024/LLGo 22.790 ns/op +0.44 ns/op / +2.0% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/128/Go 4.675 ns/op +0.464 ns/op / +11.0% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/128/LLGo 4.132 ns/op +0.091 ns/op / +2.3% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/8/Go 3.724 ns/op -1.062 ns/op / -22.2% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/8/LLGo 1.561 ns/op -0.201 ns/op / -11.4% (better)
Windows MinGW BenchmarkStringEquality/strings/first/1024/Go 3.970 ns/op +0.214 ns/op / +5.7% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/1024/LLGo 1.616 ns/op +0.441 ns/op / +37.5% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/128/Go 4.446 ns/op +0.689 ns/op / +18.3% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/128/LLGo 1.610 ns/op +0.061 ns/op / +3.9% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/8/Go 3.984 ns/op -0.807 ns/op / -16.8% (better)
Windows MinGW BenchmarkStringEquality/strings/first/8/LLGo 1.327 ns/op -0.219 ns/op / -14.2% (better)
Windows MinGW BenchmarkStringEquality/strings/last/1024/Go 11.080 ns/op +1.764 ns/op / +18.9% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/1024/LLGo 22.200 ns/op +1.77 ns/op / +8.7% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/128/Go 4.462 ns/op +0.637 ns/op / +16.7% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/128/LLGo 4.053 ns/op +0.235 ns/op / +6.2% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/8/Go 3.269 ns/op -0.268 ns/op / -7.6% (better)
Windows MinGW BenchmarkStringEquality/strings/last/8/LLGo 1.345 ns/op -0.186 ns/op / -12.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/1024/Go 31.120 ns/op +0.09 ns/op / +0.3% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/1024/LLGo 33.730 ns/op -0.67 ns/op / -1.9% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/128/Go 10.140 ns/op -0.02 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/128/LLGo 8.063 ns/op -0.181 ns/op / -2.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/8/Go 7.496 ns/op +0.074 ns/op / +1.0% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/8/LLGo 4.964 ns/op -0.328 ns/op / -6.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/1024/Go 8.043 ns/op -0.017 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/1024/LLGo 4.022 ns/op +0.014 ns/op / +0.3% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/128/Go 8.050 ns/op -0.036 ns/op / -0.4% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/128/LLGo 3.999 ns/op +0.024 ns/op / +0.6% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/8/Go 6.914 ns/op -0.011 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/8/LLGo 3.998 ns/op -0.11 ns/op / -2.7% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/1024/Go 30.330 ns/op -0.02 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/1024/LLGo 33.380 ns/op -0.09 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/128/Go 9.530 ns/op -0.053 ns/op / -0.6% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/128/LLGo 7.718 ns/op +0.196 ns/op / +2.6% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/8/Go 7.508 ns/op +0.076 ns/op / +1.0% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/8/LLGo 4.581 ns/op +0.065 ns/op / +1.4% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/1024/Go 28.570 ns/op -0.06 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/1024/LLGo 34.070 ns/op +0.35 ns/op / +1.0% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/128/Go 9.566 ns/op +0.129 ns/op / +1.4% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/128/LLGo 8.298 ns/op +0.278 ns/op / +3.5% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/8/Go 7.928 ns/op +0.27 ns/op / +3.5% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/8/LLGo 5.342 ns/op +0.405 ns/op / +8.2% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/1024/Go 7.801 ns/op +0.054 ns/op / +0.7% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/1024/LLGo 4.048 ns/op +0.07 ns/op / +1.8% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/128/Go 7.809 ns/op +0.013 ns/op / +0.2% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/128/LLGo 4.039 ns/op +0.044 ns/op / +1.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/8/Go 6.936 ns/op +0.095 ns/op / +1.4% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/8/LLGo 4.019 ns/op -0.122 ns/op / -2.9% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/1024/Go 28 ns/op +0.08 ns/op / +0.3% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/last/1024/LLGo 33.220 ns/op +0.06 ns/op / +0.2% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/last/128/Go 9.502 ns/op +0.418 ns/op / +4.6% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/last/128/LLGo 7.697 ns/op +0.075 ns/op / +1.0% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/last/8/Go 7.197 ns/op -0.046 ns/op / -0.6% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/8/LLGo 4.382 ns/op -0.114 ns/op / -2.5% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/1024/Go 31.480 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/1024/LLGo 40.400 ns/op +1.21 ns/op / +3.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/128/Go 6.683 ns/op -0.047 ns/op / -0.7% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/128/LLGo 7.397 ns/op -0.033 ns/op / -0.4% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/8/Go 3.711 ns/op -0.025 ns/op / -0.7% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/8/LLGo 2.805 ns/op -0.011 ns/op / -0.4% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/1024/Go 4.723 ns/op -0.029 ns/op / -0.6% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/1024/LLGo 1.948 ns/op -0.131 ns/op / -6.3% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/128/Go 4.886 ns/op +0.048 ns/op / +1.0% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/128/LLGo 1.879 ns/op -0.001 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/8/Go 3.547 ns/op +0.159 ns/op / +4.7% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/8/LLGo 1.887 ns/op +0.001 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/1024/Go 31.190 ns/op -0.14 ns/op / -0.4% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/1024/LLGo 40.040 ns/op +0.48 ns/op / +1.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/128/Go 6.690 ns/op -0.03 ns/op / -0.4% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/128/LLGo 6.985 ns/op -0.072 ns/op / -1.0% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/8/Go 3.586 ns/op +0.034 ns/op / +1.0% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/8/LLGo 2.550 ns/op +0.062 ns/op / +2.5% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/1024/Go 27.430 ns/op +0.01 ns/op / +0.03647% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/1024/LLGo 36.670 ns/op +0.16 ns/op / +0.4% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/128/Go 6.054 ns/op -0.02 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/128/LLGo 6.020 ns/op -0.044 ns/op / -0.7% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/8/Go 3.891 ns/op -0.097 ns/op / -2.4% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/8/LLGo 2.531 ns/op +0.023 ns/op / +0.9% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/1024/Go 4.486 ns/op -0.049 ns/op / -1.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/1024/LLGo 1.660 ns/op +0.063 ns/op / +3.9% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/128/Go 4.531 ns/op -0.025 ns/op / -0.5% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/128/LLGo 1.635 ns/op +0.004 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/8/Go 3.927 ns/op +0.026 ns/op / +0.7% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/8/LLGo 1.604 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/1024/Go 27.230 ns/op +0.07 ns/op / +0.3% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/1024/LLGo 36.050 ns/op +0.01 ns/op / +0.02775% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/128/Go 5.917 ns/op -0.017 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/128/LLGo 5.677 ns/op -0.025 ns/op / -0.4% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/8/Go 3.868 ns/op +0.006 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/8/LLGo 2.200 ns/op +0.007 ns/op / +0.3% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/1024/Go 17.610 ns/op +2.24 ns/op / +14.6% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/1024/LLGo 41.120 ns/op +5.7 ns/op / +16.1% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/128/Go 5.580 ns/op +0.964 ns/op / +20.9% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/128/LLGo 5.606 ns/op 0 ns/op / +0.0%
Windows MSVC BenchmarkStringEquality/bytes/equal/8/Go 3.942 ns/op +0.286 ns/op / +7.8% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/8/LLGo 2.991 ns/op -0.08 ns/op / -2.6% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/1024/Go 3.918 ns/op +0.568 ns/op / +17.0% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/1024/LLGo 2.508 ns/op +0.313 ns/op / +14.3% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/128/Go 3.799 ns/op +0.711 ns/op / +23.0% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/128/LLGo 2.231 ns/op +0.045 ns/op / +2.1% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/8/Go 3.730 ns/op +0.551 ns/op / +17.3% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/8/LLGo 2.347 ns/op +0.19 ns/op / +8.8% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/1024/Go 16.830 ns/op +1.81 ns/op / +12.1% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/1024/LLGo 34.830 ns/op -0.15 ns/op / -0.4% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/128/Go 4.750 ns/op +0.617 ns/op / +14.9% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/128/LLGo 5.679 ns/op +0.059 ns/op / +1.0% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/8/Go 3.352 ns/op +0.023 ns/op / +0.7% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/8/LLGo 2.664 ns/op +0.034 ns/op / +1.3% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/1024/Go 14.620 ns/op +1.95 ns/op / +15.4% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/1024/LLGo 28.830 ns/op -0.51 ns/op / -1.7% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/128/Go 5.466 ns/op +0.164 ns/op / +3.1% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/128/LLGo 5.446 ns/op +0.012 ns/op / +0.2% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/8/Go 4.053 ns/op +0.813 ns/op / +25.1% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/8/LLGo 2.396 ns/op -0.167 ns/op / -6.5% (better)
Windows MSVC BenchmarkStringEquality/strings/first/1024/Go 3.901 ns/op +0.561 ns/op / +16.8% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/1024/LLGo 2.230 ns/op +0.223 ns/op / +11.1% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/128/Go 3.661 ns/op +0.672 ns/op / +22.5% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/128/LLGo 1.903 ns/op -0.006 ns/op / -0.3% (better)
Windows MSVC BenchmarkStringEquality/strings/first/8/Go 3.534 ns/op +0.275 ns/op / +8.4% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/8/LLGo 1.912 ns/op -0.004 ns/op / -0.2% (better)
Windows MSVC BenchmarkStringEquality/strings/last/1024/Go 13.760 ns/op +1.84 ns/op / +15.4% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/1024/LLGo 32.140 ns/op -0.1 ns/op / -0.3% (better)
Windows MSVC BenchmarkStringEquality/strings/last/128/Go 4.734 ns/op +0.491 ns/op / +11.6% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/128/LLGo 5.302 ns/op +0.002 ns/op / +0.03774% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/8/Go 3.387 ns/op +0.186 ns/op / +5.8% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/8/LLGo 2.630 ns/op +0.063 ns/op / +2.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/1024/Go 19.790 ns/op +1.26 ns/op / +6.8% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/1024/LLGo 54.080 ns/op +3.81 ns/op / +7.6% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/128/Go 5.737 ns/op +0.345 ns/op / +6.4% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/128/LLGo 10.100 ns/op +0.542 ns/op / +5.7% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/8/Go 4.457 ns/op +0.293 ns/op / +7.0% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/8/LLGo 2.857 ns/op +0.14 ns/op / +5.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/1024/Go 4.523 ns/op -1.355 ns/op / -23.1% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/1024/LLGo 2.296 ns/op +0.146 ns/op / +6.8% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/128/Go 4.474 ns/op +0.212 ns/op / +5.0% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/128/LLGo 2.289 ns/op +0.08 ns/op / +3.6% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/8/Go 4.498 ns/op +0.591 ns/op / +15.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/8/LLGo 2.299 ns/op +0.1 ns/op / +4.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/1024/Go 19.700 ns/op +0.39 ns/op / +2.0% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/1024/LLGo 53.380 ns/op +2.71 ns/op / +5.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/128/Go 5.543 ns/op +0.326 ns/op / +6.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/128/LLGo 9.886 ns/op +0.754 ns/op / +8.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/8/Go 4.239 ns/op +0.379 ns/op / +9.8% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/8/LLGo 2.752 ns/op +0.113 ns/op / +4.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/1024/Go 18.720 ns/op +1.06 ns/op / +6.0% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/1024/LLGo 50.950 ns/op +3.06 ns/op / +6.4% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/128/Go 5.121 ns/op +0.393 ns/op / +8.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/128/LLGo 9.659 ns/op +0.649 ns/op / +7.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/8/Go 4.264 ns/op +0.397 ns/op / +10.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/8/LLGo 2.847 ns/op +0.241 ns/op / +9.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/1024/Go 4.361 ns/op -1.453 ns/op / -25.0% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/1024/LLGo 2.378 ns/op +0.167 ns/op / +7.6% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/128/Go 4.382 ns/op +0.263 ns/op / +6.4% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/128/LLGo 2.364 ns/op +0.154 ns/op / +7.0% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/8/Go 4.044 ns/op +0.2 ns/op / +5.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/8/LLGo 2.373 ns/op +0.162 ns/op / +7.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/1024/Go 18.740 ns/op +1.33 ns/op / +7.6% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/1024/LLGo 50.650 ns/op +3.08 ns/op / +6.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/128/Go 5.187 ns/op +0.306 ns/op / +6.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/128/LLGo 9.319 ns/op +0.542 ns/op / +6.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/8/Go 4.329 ns/op +0.447 ns/op / +11.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/8/LLGo 2.730 ns/op +0.17 ns/op / +6.6% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/1024/Go 31.170 ns/op -0.19 ns/op / -0.6% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/1024/LLGo 40.190 ns/op +0.2 ns/op / +0.5% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/128/Go 6.709 ns/op -0.012 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/128/LLGo 7.444 ns/op +0.042 ns/op / +0.6% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/8/Go 3.728 ns/op +0.04 ns/op / +1.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/8/LLGo 2.770 ns/op +0.046 ns/op / +1.7% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/1024/Go 4.778 ns/op -0.033 ns/op / -0.7% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/1024/LLGo 1.907 ns/op +0.001 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/128/Go 4.742 ns/op -0.002 ns/op / -0.04216% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/128/LLGo 1.747 ns/op +0.005 ns/op / +0.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/8/Go 3.530 ns/op -0.018 ns/op / -0.5% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/8/LLGo 1.749 ns/op -0.002 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/1024/Go 30.980 ns/op -0.06 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/1024/LLGo 40.010 ns/op +0.17 ns/op / +0.4% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/128/Go 6.662 ns/op +0.036 ns/op / +0.5% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/128/LLGo 7.165 ns/op +0.035 ns/op / +0.5% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/8/Go 3.542 ns/op +0.205 ns/op / +6.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/8/LLGo 2.420 ns/op +0.037 ns/op / +1.6% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/1024/Go 27.480 ns/op +0.07 ns/op / +0.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/1024/LLGo 36.430 ns/op -0.04 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/128/Go 6.057 ns/op -0.008 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/128/LLGo 6.073 ns/op +0.008 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/8/Go 3.946 ns/op +0.021 ns/op / +0.5% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/8/LLGo 2.692 ns/op +0.005 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/1024/Go 4.534 ns/op -0.035 ns/op / -0.8% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/1024/LLGo 1.718 ns/op +0.009 ns/op / +0.5% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/128/Go 4.594 ns/op +0.063 ns/op / +1.4% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/128/LLGo 1.601 ns/op +0.013 ns/op / +0.8% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/8/Go 3.887 ns/op +0.01 ns/op / +0.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/8/LLGo 1.614 ns/op -0.004 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/1024/Go 27.160 ns/op +0.01 ns/op / +0.03683% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/1024/LLGo 35.780 ns/op -0.1 ns/op / -0.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/128/Go 5.927 ns/op -0.002 ns/op / -0.03373% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/128/LLGo 5.697 ns/op +0.024 ns/op / +0.4% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/8/Go 3.914 ns/op +0.006 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/8/LLGo 2.194 ns/op -0.023 ns/op / -1.0% (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.273 s -70.64 ms / -5.3% (better) 1.448 ms -225.1 us / -13.5% (better)
Linux cprintf-lto 8240 B 0 B / +0.0% 368 B 0 B / +0.0% 1.290 s -122 ms / -8.6% (better) 1.396 ms +62.28 us / +4.7% (worse)
Linux fmtprintf 1940784 B -40 B / -0.002061% (better) 268554 B 0 B / +0.0% 7.838 s -216.8 ms / -2.7% (better) 3.445 ms -579 us / -14.4% (better)
Linux fmtprintf-lto 1017424 B -208 B / -0.02044% (better) 209822 B 0 B / +0.0% 16.929 s -898.4 ms / -5.0% (better) 3.427 ms -731 us / -17.6% (better)
Linux println 259752 B -80 B / -0.03079% (better) 18913 B 0 B / +0.0% 1.332 s -115.6 ms / -8.0% (better) 1.821 ms -88.7 us / -4.6% (better)
Linux println-lto 102248 B -16 B / -0.01565% (better) 15575 B 0 B / +0.0% 2.230 s +141.4 ms / +6.8% (worse) 1.979 ms +293.4 us / +17.4% (worse)
macOS cprintf 50944 B 0 B / +0.0% 4409 B 0 B / +0.0% 1.362 s -414.9 ms / -23.4% (better) 2.462 ms -1.455 ms / -37.1% (better)
macOS cprintf-lto 50608 B 0 B / +0.0% 161 B 0 B / +0.0% 1.040 s -646.6 ms / -38.3% (better) 3.408 ms +495.1 us / +17.0% (worse)
macOS fmtprintf 1232464 B 0 B / +0.0% 674001 B 0 B / +0.0% 3.953 s -4.254 s / -51.8% (better) 4.036 ms -4.955 ms / -55.1% (better)
macOS fmtprintf-lto 871360 B -16 B / -0.001836% (better) 520205 B 0 B / +0.0% 9.183 s -529.4 ms / -5.5% (better) 4.073 ms -2.616 ms / -39.1% (better)
macOS println 100624 B 0 B / +0.0% 26099 B 0 B / +0.0% 1.054 s -149 ms / -12.4% (better) 4.647 ms -684.8 us / -12.8% (better)
macOS println-lto 85680 B 0 B / +0.0% 22387 B 0 B / +0.0% 1.311 s -101.6 ms / -7.2% (better) 5.069 ms -1.671 ms / -24.8% (better)
Windows MinGW cprintf 741888 B 0 B / +0.0% 4230 B 0 B / +0.0% 1.286 s +4.114 ms / +0.3% (worse) 2.184 ms -104.2 us / -4.6% (better)
Windows MinGW cprintf-lto 55808 B 0 B / +0.0% 4182 B 0 B / +0.0% 1.352 s +51.08 ms / +3.9% (worse) 2.724 ms +471.9 us / +21.0% (worse)
Windows MinGW fmtprintf 5145088 B 0 B / +0.0% 360326 B 0 B / +0.0% 4.517 s +244.2 ms / +5.7% (worse) 5.959 ms -155.2 us / -2.5% (better)
Windows MinGW fmtprintf-lto 2765312 B 0 B / +0.0% 306598 B 0 B / +0.0% 7.513 s +509.3 ms / +7.3% (worse) 7.405 ms +882.1 us / +13.5% (worse)
Windows MinGW println 804352 B 0 B / +0.0% 27142 B 0 B / +0.0% 1.379 s +157.8 ms / +12.9% (worse) 4.394 ms +367.1 us / +9.1% (worse)
Windows MinGW println-lto 231936 B 0 B / +0.0% 22470 B 0 B / +0.0% 1.522 s +109.4 ms / +7.7% (worse) 4.297 ms +387.3 us / +9.9% (worse)
Windows MinGW 386 cprintf 750080 B 0 B / +0.0% 22470 B 0 B / +0.0% 1.949 s -39.53 ms / -2.0% (better) 8.328 ms -3.8 us / -0.04561% (better)
Windows MinGW 386 cprintf-lto 281600 B 0 B / +0.0% 19538 B 0 B / +0.0% 2.205 s -93.06 ms / -4.0% (better) 8.365 ms -473.7 us / -5.4% (better)
Windows MinGW 386 fmtprintf 4501504 B 0 B / +0.0% 284192 B +128 B / +0.04506% (worse) 6.520 s -187.8 ms / -2.8% (better) 11.340 ms +176.7 us / +1.6% (worse)
Windows MinGW 386 fmtprintf-lto 2892800 B -512 B / -0.0177% (better) 256066 B -184 B / -0.1% (better) 10.383 s -168.8 ms / -1.6% (better) 11.075 ms -265 us / -2.3% (better)
Windows MinGW 386 println 749056 B 0 B / +0.0% 22416 B 0 B / +0.0% 1.897 s -81.64 ms / -4.1% (better) 8.523 ms +191.1 us / +2.3% (worse)
Windows MinGW 386 println-lto 280064 B 0 B / +0.0% 19472 B 0 B / +0.0% 2.186 s -88.43 ms / -3.9% (better) 8.608 ms +300 ns / +0.003485% (worse)
Windows MinGW ARM64 cprintf 750592 B 0 B / +0.0% 4028 B 0 B / +0.0% 2.076 s -117.7 ms / -5.4% (better) 5.835 ms -493.2 us / -7.8% (better)
Windows MinGW ARM64 cprintf-lto 55296 B 0 B / +0.0% 3984 B 0 B / +0.0% 2.140 s -52.09 ms / -2.4% (better) 6.040 ms -410.6 us / -6.4% (better)
Windows MinGW ARM64 fmtprintf 5088256 B 0 B / +0.0% 301052 B 0 B / +0.0% 6.325 s -28.11 ms / -0.4% (better) 13.351 ms +428 us / +3.3% (worse)
Windows MinGW ARM64 fmtprintf-lto 2825728 B 0 B / +0.0% 257456 B 0 B / +0.0% 9.845 s +18.55 ms / +0.2% (worse) 13.632 ms +459.6 us / +3.5% (worse)
Windows MinGW ARM64 println 811008 B 0 B / +0.0% 25300 B 0 B / +0.0% 2.099 s -75.34 ms / -3.5% (better) 10.842 ms -277.1 us / -2.5% (better)
Windows MinGW ARM64 println-lto 236032 B 0 B / +0.0% 21696 B 0 B / +0.0% 2.414 s -29.62 ms / -1.2% (better) 11.052 ms -172.6 us / -1.5% (better)
Windows MSVC cprintf 986112 B 0 B / +0.0% 66003 B 0 B / +0.0% 1.432 s -33.8 ms / -2.3% (better) 3.145 ms +159.8 us / +5.4% (worse)
Windows MSVC cprintf-lto 303616 B 0 B / +0.0% 65971 B 0 B / +0.0% 1.540 s +60.73 ms / +4.1% (worse) 3.240 ms +425.1 us / +15.1% (worse)
Windows MSVC fmtprintf 5444608 B 0 B / +0.0% 456390 B 0 B / +0.0% 5.101 s +313.2 ms / +6.5% (worse) 9.289 ms -150 us / -1.6% (better)
Windows MSVC fmtprintf-lto 3090944 B 0 B / +0.0% 404998 B 0 B / +0.0% 7.833 s +355.2 ms / +4.7% (worse) 9.029 ms -125.4 us / -1.4% (better)
Windows MSVC println 1118720 B 0 B / +0.0% 123286 B 0 B / +0.0% 1.444 s +27.56 ms / +1.9% (worse) 6.391 ms +569.6 us / +9.8% (worse)
Windows MSVC println-lto 553984 B 0 B / +0.0% 119286 B 0 B / +0.0% 1.628 s -7.508 ms / -0.5% (better) 6.157 ms -1.062 ms / -14.7% (better)
Windows MSVC 386 cprintf 658944 B 0 B / +0.0% 21150 B 0 B / +0.0% 1.358 s +190.5 ms / +16.3% (worse) 7.189 ms +1.075 ms / +17.6% (worse)
Windows MSVC 386 cprintf-lto 221184 B 0 B / +0.0% 18959 B 0 B / +0.0% 1.541 s +232.3 ms / +17.7% (worse) 6.583 ms +1.081 ms / +19.6% (worse)
Windows MSVC 386 fmtprintf 4227584 B -512 B / -0.01211% (better) 267650 B +128 B / +0.04785% (worse) 4.781 s +696.5 ms / +17.1% (worse) 10.317 ms +1.901 ms / +22.6% (worse)
Windows MSVC 386 fmtprintf-lto 2705920 B +512 B / +0.01893% (worse) 236145 B +144 B / +0.1% (worse) 7.376 s +817 ms / +12.5% (worse) 9.305 ms +1.355 ms / +17.0% (worse)
Windows MSVC 386 println 656896 B 0 B / +0.0% 21096 B 0 B / +0.0% 1.459 s +283.6 ms / +24.1% (worse) 6.415 ms +226 us / +3.7% (worse)
Windows MSVC 386 println-lto 219648 B 0 B / +0.0% 18889 B 0 B / +0.0% 1.524 s +232.1 ms / +18.0% (worse) 6.330 ms +384.7 us / +6.5% (worse)
Windows MSVC ARM64 cprintf 753152 B 0 B / +0.0% 4240 B 0 B / +0.0% 2.031 s -63.01 ms / -3.0% (better) 7.282 ms -164.6 us / -2.2% (better)
Windows MSVC ARM64 cprintf-lto 60928 B 0 B / +0.0% 4140 B 0 B / +0.0% 2.057 s -24.16 ms / -1.2% (better) 7.277 ms +23.7 us / +0.3% (worse)
Windows MSVC ARM64 fmtprintf 5084672 B 0 B / +0.0% 301396 B 0 B / +0.0% 6.660 s +71.82 ms / +1.1% (worse) 16.522 ms -594.8 us / -3.5% (better)
Windows MSVC ARM64 fmtprintf-lto 2833920 B 0 B / +0.0% 258400 B 0 B / +0.0% 10.331 s +95.25 ms / +0.9% (worse) 18.382 ms +718.6 us / +4.1% (worse)
Windows MSVC ARM64 println 814592 B 0 B / +0.0% 25804 B 0 B / +0.0% 2.047 s -29.39 ms / -1.4% (better) 12.901 ms -232.4 us / -1.8% (better)
Windows MSVC ARM64 println-lto 242176 B 0 B / +0.0% 22240 B 0 B / +0.0% 2.300 s +9.136 ms / +0.4% (worse) 13.953 ms +885.1 us / +6.8% (worse)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 14.680 ns/op -2.38 ns/op / -14.0% (better)
Linux BenchmarkMergeCompilerFlags 198.100 ns/op -106.8 ns/op / -35.0% (better)
Linux BenchmarkMergeLinkerFlags 133.300 ns/op -48.6 ns/op / -26.7% (better)
Linux BenchmarkChannelBuffered 74.010 ns/op -1.05 ns/op / -1.4% (better)
Linux BenchmarkChannelHandoff 14352 ns/op -1287 ns/op / -8.2% (better)
Linux BenchmarkDefer 17.350 ns/op -0.53 ns/op / -3.0% (better)
Linux BenchmarkDirectCall 1.574 ns/op -1.194 ns/op / -43.1% (better)
Linux BenchmarkGlobalRead 1.616 ns/op +0.047 ns/op / +3.0% (worse)
Linux BenchmarkGlobalWrite 7.899 ns/op -1.744 ns/op / -18.1% (better)
Linux BenchmarkGoroutine 29396 ns/op +2971 ns/op / +11.2% (worse)
Linux BenchmarkInterfaceCall 4.763 ns/op -0.85 ns/op / -15.1% (better)
Linux BenchmarkRuntimeGetG 2.562 ns/op -0.228 ns/op / -8.2% (better)
macOS BenchmarkLookupPCRandom 12.890 ns/op -1.82 ns/op / -12.4% (better)
macOS BenchmarkMergeCompilerFlags 115.400 ns/op -38.3 ns/op / -24.9% (better)
macOS BenchmarkMergeLinkerFlags 78.010 ns/op -5.64 ns/op / -6.7% (better)
macOS BenchmarkChannelBuffered 25.100 ns/op -6.95 ns/op / -21.7% (better)
macOS BenchmarkChannelHandoff 8232 ns/op -2822 ns/op / -25.5% (better)
macOS BenchmarkDefer 12.380 ns/op -1.18 ns/op / -8.7% (better)
macOS BenchmarkDirectCall 1.086 ns/op -0.124 ns/op / -10.2% (better)
macOS BenchmarkGlobalRead 1.000 ns/op -0.2444 ns/op / -19.6% (better)
macOS BenchmarkGlobalWrite 1.107 ns/op -0.263 ns/op / -19.2% (better)
macOS BenchmarkGoroutine 80958 ns/op +48911 ns/op / +152.6% (worse)
macOS BenchmarkInterfaceCall 3.913 ns/op -0.48 ns/op / -10.9% (better)
macOS BenchmarkRuntimeGetG 2.546 ns/op -0.315 ns/op / -11.0% (better)
Windows MinGW BenchmarkLookupPCRandom 7.355 ns/op -0.051 ns/op / -0.7% (better)
Windows MinGW BenchmarkMergeCompilerFlags 289.100 ns/op +1.3 ns/op / +0.5% (worse)
Windows MinGW BenchmarkMergeLinkerFlags 266.900 ns/op +9.8 ns/op / +3.8% (worse)
Windows MinGW BenchmarkChannelBuffered 38.110 ns/op +0.2 ns/op / +0.5% (worse)
Windows MinGW BenchmarkChannelHandoff 839.700 ns/op -0.4 ns/op / -0.04761% (better)
Windows MinGW BenchmarkDefer 9.145 ns/op +0.285 ns/op / +3.2% (worse)
Windows MinGW BenchmarkDirectCall 0.937 ns/op +0.0507 ns/op / +5.7% (worse)
Windows MinGW BenchmarkGlobalRead 0.912 ns/op +0.0234 ns/op / +2.6% (worse)
Windows MinGW BenchmarkGlobalWrite 4.799 ns/op +0.352 ns/op / +7.9% (worse)
Windows MinGW BenchmarkGoroutine 44331 ns/op +519 ns/op / +1.2% (worse)
Windows MinGW BenchmarkInterfaceCall 3.998 ns/op +0.215 ns/op / +5.7% (worse)
Windows MinGW BenchmarkRuntimeGetG 0.899 ns/op -0.0189 ns/op / -2.1% (better)
Windows MinGW 386 BenchmarkLookupPCRandom 26.510 ns/op +0.04 ns/op / +0.2% (worse)
Windows MinGW 386 BenchmarkMergeCompilerFlags 739 ns/op +45.4 ns/op / +6.5% (worse)
Windows MinGW 386 BenchmarkMergeLinkerFlags 662.800 ns/op +16.7 ns/op / +2.6% (worse)
Windows MinGW 386 BenchmarkChannelBuffered 44.220 ns/op +0.7 ns/op / +1.6% (worse)
Windows MinGW 386 BenchmarkChannelHandoff 882.400 ns/op -9.4 ns/op / -1.1% (better)
Windows MinGW 386 BenchmarkDefer 14.320 ns/op -0.57 ns/op / -3.8% (better)
Windows MinGW 386 BenchmarkDirectCall 1.858 ns/op +0.311 ns/op / +20.1% (worse)
Windows MinGW 386 BenchmarkGlobalRead 1.554 ns/op -0.305 ns/op / -16.4% (better)
Windows MinGW 386 BenchmarkGlobalWrite 7.784 ns/op -0.004 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkGoroutine 106079 ns/op +1290 ns/op / +1.2% (worse)
Windows MinGW 386 BenchmarkInterfaceCall 7.433 ns/op +0.001 ns/op / +0.01346% (worse)
Windows MinGW 386 BenchmarkRuntimeGetG 1.924 ns/op -0.245 ns/op / -11.3% (better)
Windows MinGW ARM64 BenchmarkLookupPCRandom 12.100 ns/op +0.08 ns/op / +0.7% (worse)
Windows MinGW ARM64 BenchmarkMergeCompilerFlags 565.900 ns/op +1.1 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkMergeLinkerFlags 508.900 ns/op -20.5 ns/op / -3.9% (better)
Windows MinGW ARM64 BenchmarkChannelBuffered 42.590 ns/op -0.07 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkChannelHandoff 4741 ns/op +357 ns/op / +8.1% (worse)
Windows MinGW ARM64 BenchmarkDefer 12 ns/op +0.17 ns/op / +1.4% (worse)
Windows MinGW ARM64 BenchmarkDirectCall 0.589 ns/op -0.0003 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkGlobalRead 0.666 ns/op -0.0001 ns/op / -0.01502% (better)
Windows MinGW ARM64 BenchmarkGlobalWrite 0.663 ns/op -0.0001 ns/op / -0.01508% (better)
Windows MinGW ARM64 BenchmarkGoroutine 59055 ns/op -2668 ns/op / -4.3% (better)
Windows MinGW ARM64 BenchmarkInterfaceCall 3.971 ns/op +0.01 ns/op / +0.3% (worse)
Windows MinGW ARM64 BenchmarkRuntimeGetG 1.769 ns/op 0 ns/op / +0.0%
Windows MSVC BenchmarkLookupPCRandom 8.097 ns/op +0.024 ns/op / +0.3% (worse)
Windows MSVC BenchmarkMergeCompilerFlags 385 ns/op -0.6 ns/op / -0.2% (better)
Windows MSVC BenchmarkMergeLinkerFlags 360 ns/op +5.8 ns/op / +1.6% (worse)
Windows MSVC BenchmarkChannelBuffered 37.650 ns/op -0.01 ns/op / -0.02655% (better)
Windows MSVC BenchmarkChannelHandoff 6792 ns/op +3839 ns/op / +130.0% (worse)
Windows MSVC BenchmarkDefer 8.409 ns/op +0.057 ns/op / +0.7% (worse)
Windows MSVC BenchmarkDirectCall 0.240 ns/op -0.0386 ns/op / -13.8% (better)
Windows MSVC BenchmarkGlobalRead 0.315 ns/op -0.0171 ns/op / -5.2% (better)
Windows MSVC BenchmarkGlobalWrite 6.931 ns/op +0.011 ns/op / +0.2% (worse)
Windows MSVC BenchmarkGoroutine 63685 ns/op -4686 ns/op / -6.9% (better)
Windows MSVC BenchmarkInterfaceCall 4.296 ns/op +0.15 ns/op / +3.6% (worse)
Windows MSVC BenchmarkRuntimeGetG 0.882 ns/op +0.0008 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkLookupPCRandom 15.960 ns/op +0.92 ns/op / +6.1% (worse)
Windows MSVC 386 BenchmarkMergeCompilerFlags 391 ns/op +26.9 ns/op / +7.4% (worse)
Windows MSVC 386 BenchmarkMergeLinkerFlags 376.100 ns/op +21.6 ns/op / +6.1% (worse)
Windows MSVC 386 BenchmarkChannelBuffered 48.330 ns/op +0.1 ns/op / +0.2% (worse)
Windows MSVC 386 BenchmarkChannelHandoff 981.900 ns/op -0.5 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkDefer 8.238 ns/op +0.105 ns/op / +1.3% (worse)
Windows MSVC 386 BenchmarkDirectCall 0.945 ns/op +0.0575 ns/op / +6.5% (worse)
Windows MSVC 386 BenchmarkGlobalRead 0.951 ns/op +0.0306 ns/op / +3.3% (worse)
Windows MSVC 386 BenchmarkGlobalWrite 8.515 ns/op +0.523 ns/op / +6.5% (worse)
Windows MSVC 386 BenchmarkGoroutine 57775 ns/op +389 ns/op / +0.7% (worse)
Windows MSVC 386 BenchmarkInterfaceCall 3.793 ns/op +0.023 ns/op / +0.6% (worse)
Windows MSVC 386 BenchmarkRuntimeGetG 0.993 ns/op -0.0068 ns/op / -0.7% (better)
Windows MSVC ARM64 BenchmarkLookupPCRandom 12.140 ns/op +0.04 ns/op / +0.3% (worse)
Windows MSVC ARM64 BenchmarkMergeCompilerFlags 567.200 ns/op -7.4 ns/op / -1.3% (better)
Windows MSVC ARM64 BenchmarkMergeLinkerFlags 547.500 ns/op +2.3 ns/op / +0.4% (worse)
Windows MSVC ARM64 BenchmarkChannelBuffered 45.610 ns/op -0.05 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkChannelHandoff 2802 ns/op -129 ns/op / -4.4% (better)
Windows MSVC ARM64 BenchmarkDefer 11.900 ns/op -0.18 ns/op / -1.5% (better)
Windows MSVC ARM64 BenchmarkDirectCall 0.589 ns/op -0.0003 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkGlobalRead 0.664 ns/op -0.0002 ns/op / -0.03013% (better)
Windows MSVC ARM64 BenchmarkGlobalWrite 3.794 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkGoroutine 60963 ns/op +446 ns/op / +0.7% (worse)
Windows MSVC ARM64 BenchmarkInterfaceCall 3.872 ns/op +0.001 ns/op / +0.02583% (worse)
Windows MSVC ARM64 BenchmarkRuntimeGetG 1.797 ns/op +0.027 ns/op / +1.5% (worse)
Timer runtime benchmarks
Platform Operation and runtime ns/op vs base
Linux AfterFuncZeroDelivery/Go 912 ns/op -74.7 ns/op / -7.6% (better)
Linux AfterFuncZeroDelivery/LLGo 43749 ns/op -4120 ns/op / -8.6% (better)
Linux CreateStop/Go 299.800 ns/op -94.5 ns/op / -24.0% (better)
Linux CreateStop/LLGo 1474 ns/op -41 ns/op / -2.7% (better)
Linux RearmStopped/Go 116.100 ns/op -4.6 ns/op / -3.8% (better)
Linux RearmStopped/LLGo 1075 ns/op +58 ns/op / +5.7% (worse)
Linux ResetActive/Go 68.740 ns/op -6.38 ns/op / -8.5% (better)
Linux ResetActive/LLGo 617.300 ns/op -332.2 ns/op / -35.0% (better)
Linux ResetHeap1024/Go 67.170 ns/op -2.13 ns/op / -3.1% (better)
Linux ResetHeap1024/LLGo 131.100 ns/op -2.9 ns/op / -2.2% (better)
macOS AfterFuncZeroDelivery/Go 404 ns/op -190.4 ns/op / -32.0% (better)
macOS AfterFuncZeroDelivery/LLGo 69809 ns/op +13484 ns/op / +23.9% (worse)
macOS CreateStop/Go 160 ns/op +7.9 ns/op / +5.2% (worse)
macOS CreateStop/LLGo 525.600 ns/op +117.7 ns/op / +28.9% (worse)
macOS RearmStopped/Go 59.740 ns/op -17.86 ns/op / -23.0% (better)
macOS RearmStopped/LLGo 210.900 ns/op -9.8 ns/op / -4.4% (better)
macOS ResetActive/Go 51.930 ns/op +4.45 ns/op / +9.4% (worse)
macOS ResetActive/LLGo 103.100 ns/op -33.1 ns/op / -24.3% (better)
macOS ResetHeap1024/Go 39.920 ns/op -16.77 ns/op / -29.6% (better)
macOS ResetHeap1024/LLGo 62.720 ns/op -17.75 ns/op / -22.1% (better)
Windows MinGW AfterFuncZeroDelivery/Go 425.800 ns/op +7 ns/op / +1.7% (worse)
Windows MinGW AfterFuncZeroDelivery/LLGo 89170 ns/op +5245 ns/op / +6.2% (worse)
Windows MinGW CreateStop/Go 119.500 ns/op -1.4 ns/op / -1.2% (better)
Windows MinGW CreateStop/LLGo 406.200 ns/op +3.4 ns/op / +0.8% (worse)
Windows MinGW RearmStopped/Go 47.850 ns/op +1.17 ns/op / +2.5% (worse)
Windows MinGW RearmStopped/LLGo 320 ns/op +161.6 ns/op / +102.0% (worse)
Windows MinGW ResetActive/Go 21.570 ns/op +0.31 ns/op / +1.5% (worse)
Windows MinGW ResetActive/LLGo 230.100 ns/op -342 ns/op / -59.8% (better)
Windows MinGW ResetHeap1024/Go 21.040 ns/op +0.39 ns/op / +1.9% (worse)
Windows MinGW ResetHeap1024/LLGo 79.440 ns/op -0.4 ns/op / -0.5% (better)
Windows MinGW 386 AfterFuncZeroDelivery/Go 928.600 ns/op -22.9 ns/op / -2.4% (better)
Windows MinGW 386 AfterFuncZeroDelivery/LLGo 197183 ns/op +2023 ns/op / +1.0% (worse)
Windows MinGW 386 CreateStop/Go 189.600 ns/op -3.2 ns/op / -1.7% (better)
Windows MinGW 386 CreateStop/LLGo 430.600 ns/op -25.4 ns/op / -5.6% (better)
Windows MinGW 386 RearmStopped/Go 63.240 ns/op -0.24 ns/op / -0.4% (better)
Windows MinGW 386 RearmStopped/LLGo 410.700 ns/op +101 ns/op / +32.6% (worse)
Windows MinGW 386 ResetActive/Go 38.930 ns/op -0.19 ns/op / -0.5% (better)
Windows MinGW 386 ResetActive/LLGo 980.700 ns/op +12.5 ns/op / +1.3% (worse)
Windows MinGW 386 ResetHeap1024/Go 39.430 ns/op -0.02 ns/op / -0.1% (better)
Windows MinGW 386 ResetHeap1024/LLGo 147.300 ns/op +0.3 ns/op / +0.2% (worse)
Windows MinGW ARM64 AfterFuncZeroDelivery/Go 663.100 ns/op -0.1 ns/op / -0.01508% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/LLGo 133487 ns/op -2943 ns/op / -2.2% (better)
Windows MinGW ARM64 CreateStop/Go 193.100 ns/op +0.8 ns/op / +0.4% (worse)
Windows MinGW ARM64 CreateStop/LLGo 412.100 ns/op +53.7 ns/op / +15.0% (worse)
Windows MinGW ARM64 RearmStopped/Go 70.550 ns/op -0.13 ns/op / -0.2% (better)
Windows MinGW ARM64 RearmStopped/LLGo 162.100 ns/op +0.8 ns/op / +0.5% (worse)
Windows MinGW ARM64 ResetActive/Go 31 ns/op +0.03 ns/op / +0.1% (worse)
Windows MinGW ARM64 ResetActive/LLGo 99.060 ns/op +0.62 ns/op / +0.6% (worse)
Windows MinGW ARM64 ResetHeap1024/Go 31.060 ns/op -0.02 ns/op / -0.1% (better)
Windows MinGW ARM64 ResetHeap1024/LLGo 92.160 ns/op +0.19 ns/op / +0.2% (worse)
Windows MSVC AfterFuncZeroDelivery/Go 469.200 ns/op +4 ns/op / +0.9% (worse)
Windows MSVC AfterFuncZeroDelivery/LLGo 126648 ns/op -7140 ns/op / -5.3% (better)
Windows MSVC CreateStop/Go 131.800 ns/op -0.2 ns/op / -0.2% (better)
Windows MSVC CreateStop/LLGo 483 ns/op -12.2 ns/op / -2.5% (better)
Windows MSVC RearmStopped/Go 49.660 ns/op +0.16 ns/op / +0.3% (worse)
Windows MSVC RearmStopped/LLGo 193.200 ns/op -16.6 ns/op / -7.9% (better)
Windows MSVC ResetActive/Go 21.960 ns/op -0.05 ns/op / -0.2% (better)
Windows MSVC ResetActive/LLGo 453.200 ns/op +190.1 ns/op / +72.3% (worse)
Windows MSVC ResetHeap1024/Go 21.940 ns/op -0.01 ns/op / -0.04556% (better)
Windows MSVC ResetHeap1024/LLGo 72.280 ns/op -21.24 ns/op / -22.7% (better)
Windows MSVC 386 AfterFuncZeroDelivery/Go 619.900 ns/op +1.5 ns/op / +0.2% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/LLGo 109486 ns/op +3734 ns/op / +3.5% (worse)
Windows MSVC 386 CreateStop/Go 160.600 ns/op +1.6 ns/op / +1.0% (worse)
Windows MSVC 386 CreateStop/LLGo 503.800 ns/op -64.7 ns/op / -11.4% (better)
Windows MSVC 386 RearmStopped/Go 62.940 ns/op +3.93 ns/op / +6.7% (worse)
Windows MSVC 386 RearmStopped/LLGo 363.900 ns/op +73.6 ns/op / +25.4% (worse)
Windows MSVC 386 ResetActive/Go 29.950 ns/op +1.51 ns/op / +5.3% (worse)
Windows MSVC 386 ResetActive/LLGo 744.800 ns/op +28.6 ns/op / +4.0% (worse)
Windows MSVC 386 ResetHeap1024/Go 30 ns/op +1.94 ns/op / +6.9% (worse)
Windows MSVC 386 ResetHeap1024/LLGo 95.840 ns/op +3.53 ns/op / +3.8% (worse)
Windows MSVC ARM64 AfterFuncZeroDelivery/Go 672.600 ns/op -12.7 ns/op / -1.9% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/LLGo 154217 ns/op -220 ns/op / -0.1% (better)
Windows MSVC ARM64 CreateStop/Go 196.100 ns/op -1.4 ns/op / -0.7% (better)
Windows MSVC ARM64 CreateStop/LLGo 360.600 ns/op -6.8 ns/op / -1.9% (better)
Windows MSVC ARM64 RearmStopped/Go 70.570 ns/op -0.03 ns/op / -0.04249% (better)
Windows MSVC ARM64 RearmStopped/LLGo 177.600 ns/op +0.2 ns/op / +0.1% (worse)
Windows MSVC ARM64 ResetActive/Go 31.020 ns/op -0.07 ns/op / -0.2% (better)
Windows MSVC ARM64 ResetActive/LLGo 101.700 ns/op -1 ns/op / -1.0% (better)
Windows MSVC ARM64 ResetHeap1024/Go 31.120 ns/op -0.02 ns/op / -0.1% (better)
Windows MSVC ARM64 ResetHeap1024/LLGo 91.870 ns/op +0.51 ns/op / +0.6% (worse)

Compared with a87e123ec339 measured in the same runner job.

Comment thread ssa/memory.go Outdated
if b.Prog.GoWordSize() != 4 {
return
}
if _, ok := typ.RawType().Underlying().(*types.Basic); ok {

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.

Non-blocking follow-up: this fixes the basic-type accesses, while ordinary whole-array accesses still have the same alignment overclaim. For example:

type S struct {
    B byte
    V [2]int64
}

func read(p *S) [2]int64 { return p.V }
func write(p *S, v [2]int64) { p.V = v }

On Windows/386, V is at offset 4 in a struct aligned to 4 bytes, but these functions still emit load [2 x i64] / store [2 x i64] with align 8. The *types.Basic guard excludes this array type; nested arrays have the same issue. This is an invalid alignment guarantee under LLVM's load/store contract.

Verified with LLVM 22 on both the unchanged base a87e123ec and this head beb88875c; the PR head was also checked through ordinary Go source lowering. The same array probe still reproduces on #2937 and #3029. These were cross-target IR checks, not native Windows execution.

This is a pre-existing issue and does not block this PR's scalar fix. Please track whole-array/aggregate access alignment as a follow-up to #2809.

@zhouguangyuan0718 zhouguangyuan0718 changed the title fix(ssa): honor Go scalar access alignment on 32-bit targets fix(ssa): honor Go basic value access alignment on 32-bit targets Nov 9, 2026
@zhouguangyuan0718 zhouguangyuan0718 changed the title fix(ssa): honor Go basic value access alignment on 32-bit targets fix(ssa): honor 32-bit Go alignment for basic values and arrays Nov 10, 2026
@cpunion
cpunion merged commit 69b5910 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.

Windows/386 emits align 8 loads and stores for Go struct fields aligned to 4 bytes

2 participants