Skip to content

fix(cabi): classify unaligned SysV aggregates as memory - #2941

Merged
cpunion merged 5 commits into
xgo-dev:mainfrom
cpunion:codex/sysv-unaligned-layout-20261029
Nov 11, 2026
Merged

cpunion merged 5 commits into
xgo-dev:mainfrom
cpunion:codex/sysv-unaligned-layout-20261029

Conversation

@cpunion

@cpunion cpunion commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Classify SysV AMD64 aggregates with unaligned members as MEMORY (sret results and byval arguments), including nested records, array strides and zero-sized members. Aligned controls retain register passing.

Cache aggregate classifications within each lowering pass. A 32-function shared-type benchmark improves from about 245µs to 79µs, adding approximately 336 bytes and four allocations per module.

Rebased onto main 2681caa07. Cabi/SSA suites, focused CL ABI tests and Linux/Darwin Clang signature comparisons pass. Native amd64 C execution remains CI qualification. Source-level packing directives and cgo layout recovery remain in #2937.

@codecov

codecov Bot commented Oct 29, 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 Oct 29, 2026 •

Copy link
Copy Markdown

LLGo WebAssembly build benchmarks

9da449ea522e | 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 155901 B 0 B / +0.0% 88932 B 0 B / +0.0%
cprintf/j32-goos-js/LLGo 154988 B 0 B / +0.0% 72985 B 0 B / +0.0%
cprintf/j64-emscripten-memory64/LLGo 142547 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 1634058 B 0 B / +0.0% 119298 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 1699156 B 0 B / +0.0% 89416 B 0 B / +0.0%
fmtprintf/j64-emscripten-memory64/LLGo 1514999 B 0 B / +0.0% 122540 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 1075471 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/w32-wasi/LLGo 1076761 B 0 B / +0.0% 0 B 0 B / 0.0%
j32-emscripten/LLGo 155091 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 154384 B 0 B / +0.0% 72985 B 0 B / +0.0%
j64-emscripten-memory64/LLGo 141748 B 0 B / +0.0% 92103 B 0 B / +0.0%
reflectcall/j32-emscripten/LLGo 1372642 B 0 B / +0.0% 95650 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 1385471 B 0 B / +0.0% 79699 B 0 B / +0.0%
reflectcall/j64-emscripten-memory64/LLGo 1256911 B 0 B / +0.0% 99450 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 1042193 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/w32-wasi/LLGo 1043349 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 9.411 s +521.2 ms / +5.9% (worse)
j32-goos-js 8.429 s -825.2 ms / -8.9% (better)
j64-emscripten-memory64 7.835 s -252.1 ms / -3.1% (better)
reflectcall/w32-wasi 28.989 s -1.25 s / -4.1% (better)
w32-goos-wasip1 4.422 s -338.8 ms / -7.1% (better)
w32-wasi 4.021 s -424.6 ms / -9.6% (better)

Compared with 2681caa07abe measured in the same runner job.

@cpunion

cpunion commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator Author

Investigated the failed workers job: TestRuntimeSetFinalizerWithLargeResult timed out waiting for its finalizer. I could not reproduce it on this PR's unchanged head (12b66e9686ef).

Local validation on macOS arm64:

  • With Go 1.27.0 and Node 24.22.1, the two-worker test/go suite passed three consecutive Memory32 runs and one Memory64 run.
  • Fourteen additional Memory32 suite runs passed; the large-result and narrow-result finalizer tests also each passed 20 focused repetitions.
  • The existing goroutine-count test passed in its separate process, as the worker CI script requires.
  • go test ./internal/cabi ./ssa ./cl passed.

The original failed job has been rerun. It is currently queued for the qiniu / ubuntu-24.04-large runner; remote CI verification is still pending.

@cpunion
cpunion marked this pull request as ready for review November 2, 2026 00:45

@cpunion cpunion left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewed 12b66e968. The ordinary packed, nested, array-stride, and aligned-control cases behave as intended. Full go test -count=1 ./internal/cabi ./ssa ./cl passed on macOS arm64 / LLVM 22.1.8. I also checked complete signature lowering and LLVM verification for 11 layouts on each of Linux/Darwin AMD64, compared their MEMORY/register classification with Clang, and verified the caller's byval storage alignment.

One remaining compatibility case is documented inline: an unaligned zero-length array member. It also fails on the PR's base, so this is an uncovered case in the fix, not a newly introduced regression.

Comment thread internal/cabi/arch.go Resolved

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

FennoAI Review

This PR correctly fixes a real SysV AMD64 ABI bug: aggregates with unaligned (packed) fields are now classified as MEMORY (byval pointer) instead of being flattened into registers, which would otherwise lose the packed member offsets. I independently verified the correctness of the change:

  • The hasUnalignedField recursion and uint64 offset arithmetic are sound. Recursion terminates (by-value self-reference is impossible in LLVM; pointers end the descent), the zero-size guard is correct, and the modulo at arch.go:186 cannot divide by zero (ABITypeAlignment is always ≥ 1 for sized types).
  • The array branch probing only element 0 and element 1 is provably sufficient, not just a heuristic: for a fixed internal field, the per-element alignment residues form an arithmetic progression modulo a power of two, so if elements 0 and 1 are both aligned, every element is. The "array stride" test case ([2 x <{i32, i8}>]) specifically exercises this path.
  • The comments accurately describe the SysV ABI behavior, and no public-facing docs need updating.

The notes below are minor/optional — none block the change.

Minor (not inline):

  • hasUnalignedField's array branch makes two recursive calls per array level (element 0 and element 1), so deeply nested arrays-of-arrays cost 2^D calls with no memoization. This is on the compile-time ABI path and bounded by array nesting depth, so practical impact is small, but it is an avoidable asymptotic cost relative to the linear walkers (elementTypesCount/elementTypes) already in this file.
  • Optional test coverage: every MEMORY fixture has alignment 1, so the max(8, info.Align) upper branch is never exercised; and no case asserts info.Type1 == PointerType(typ, 0). Adding an over-aligned packed fixture and a pointer-shape assertion would lock in the full MEMORY classification.

Comment thread internal/cabi/arch.go Resolved
Comment thread internal/cabi/amd64_aligned_test.go Resolved
@cpunion
cpunion force-pushed the codex/sysv-unaligned-layout-20261029 branch from 12b66e9 to 9a847ea Compare November 2, 2026 01:07
@cpunion

cpunion commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator Author

Also addressed the non-inline notes in the review, in d218e4e35:

  • Array classification now visits the element once and checks the stride against its maximum member alignment, removing the exponential walk through nested arrays. Added an 18-level nesting benchmark and nested-array controls.
  • Added the 16-byte-aligned packed case and pointer-shape assertions; Clang 22 agrees on Linux/Darwin AMD64.

Full cabi/ssa/cl tests and cabi vet pass. The changed alignment helpers and MEMORY helper have 100% local statement coverage in the focused AMD64/SysV tests.

@cpunion
cpunion marked this pull request as draft November 2, 2026 02:07
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

LLGo baseline benchmarks

9da449ea522e | workflow run | long-term charts

String equality benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkStringEquality/bytes/equal/1024/Go 29.770 ns/op +3.86 ns/op / +14.9% (worse)
Linux BenchmarkStringEquality/bytes/equal/1024/LLGo 63.040 ns/op -0.31 ns/op / -0.5% (better)
Linux BenchmarkStringEquality/bytes/equal/128/Go 8.360 ns/op -0.018 ns/op / -0.2% (better)
Linux BenchmarkStringEquality/bytes/equal/128/LLGo 11.880 ns/op -0.06 ns/op / -0.5% (better)
Linux BenchmarkStringEquality/bytes/equal/8/Go 5.819 ns/op -0.261 ns/op / -4.3% (better)
Linux BenchmarkStringEquality/bytes/equal/8/LLGo 4.661 ns/op -0.033 ns/op / -0.7% (better)
Linux BenchmarkStringEquality/bytes/first/1024/Go 6.635 ns/op +0.004 ns/op / +0.1% (worse)
Linux BenchmarkStringEquality/bytes/first/1024/LLGo 3.549 ns/op +0.024 ns/op / +0.7% (worse)
Linux BenchmarkStringEquality/bytes/first/128/Go 7.634 ns/op +0.882 ns/op / +13.1% (worse)
Linux BenchmarkStringEquality/bytes/first/128/LLGo 3.500 ns/op -0.003 ns/op / -0.1% (better)
Linux BenchmarkStringEquality/bytes/first/8/Go 6.147 ns/op +0.287 ns/op / +4.9% (worse)
Linux BenchmarkStringEquality/bytes/first/8/LLGo 3.514 ns/op -0.012 ns/op / -0.3% (better)
Linux BenchmarkStringEquality/bytes/last/1024/Go 25.090 ns/op -3.34 ns/op / -11.7% (better)
Linux BenchmarkStringEquality/bytes/last/1024/LLGo 62.820 ns/op -3.97 ns/op / -5.9% (better)
Linux BenchmarkStringEquality/bytes/last/128/Go 8.160 ns/op -0.004 ns/op / -0.049% (better)
Linux BenchmarkStringEquality/bytes/last/128/LLGo 11.990 ns/op -0.07 ns/op / -0.6% (better)
Linux BenchmarkStringEquality/bytes/last/8/Go 5.931 ns/op +0.075 ns/op / +1.3% (worse)
Linux BenchmarkStringEquality/bytes/last/8/LLGo 4.735 ns/op +0.06 ns/op / +1.3% (worse)
Linux BenchmarkStringEquality/strings/equal/1024/Go 24.590 ns/op +1.15 ns/op / +4.9% (worse)
Linux BenchmarkStringEquality/strings/equal/1024/LLGo 54.520 ns/op -0.2 ns/op / -0.4% (better)
Linux BenchmarkStringEquality/strings/equal/128/Go 8.207 ns/op -0.055 ns/op / -0.7% (better)
Linux BenchmarkStringEquality/strings/equal/128/LLGo 12.280 ns/op +0.7 ns/op / +6.0% (worse)
Linux BenchmarkStringEquality/strings/equal/8/Go 5.819 ns/op -0.037 ns/op / -0.6% (better)
Linux BenchmarkStringEquality/strings/equal/8/LLGo 3.888 ns/op -0.039 ns/op / -1.0% (better)
Linux BenchmarkStringEquality/strings/first/1024/Go 6.622 ns/op +0.015 ns/op / +0.2% (worse)
Linux BenchmarkStringEquality/strings/first/1024/LLGo 2.721 ns/op -0.014 ns/op / -0.5% (better)
Linux BenchmarkStringEquality/strings/first/128/Go 6.596 ns/op -0.099 ns/op / -1.5% (better)
Linux BenchmarkStringEquality/strings/first/128/LLGo 2.727 ns/op +0.013 ns/op / +0.5% (worse)
Linux BenchmarkStringEquality/strings/first/8/Go 5.855 ns/op -0.001 ns/op / -0.01708% (better)
Linux BenchmarkStringEquality/strings/first/8/LLGo 2.727 ns/op +0.001 ns/op / +0.03668% (worse)
Linux BenchmarkStringEquality/strings/last/1024/Go 22.710 ns/op -1.57 ns/op / -6.5% (better)
Linux BenchmarkStringEquality/strings/last/1024/LLGo 54.620 ns/op -0.2 ns/op / -0.4% (better)
Linux BenchmarkStringEquality/strings/last/128/Go 8.166 ns/op +0.004 ns/op / +0.04901% (worse)
Linux BenchmarkStringEquality/strings/last/128/LLGo 11.070 ns/op -0.01 ns/op / -0.1% (better)
Linux BenchmarkStringEquality/strings/last/8/Go 5.852 ns/op 0 ns/op / +0.0%
Linux BenchmarkStringEquality/strings/last/8/LLGo 3.551 ns/op +0.054 ns/op / +1.5% (worse)
macOS BenchmarkStringEquality/bytes/equal/1024/Go 38.850 ns/op +7.53 ns/op / +24.0% (worse)
macOS BenchmarkStringEquality/bytes/equal/1024/LLGo 24.460 ns/op -17.98 ns/op / -42.4% (better)
macOS BenchmarkStringEquality/bytes/equal/128/Go 10.860 ns/op +4.745 ns/op / +77.6% (worse)
macOS BenchmarkStringEquality/bytes/equal/128/LLGo 4.566 ns/op -0.728 ns/op / -13.8% (better)
macOS BenchmarkStringEquality/bytes/equal/8/Go 5.472 ns/op -1.705 ns/op / -23.8% (better)
macOS BenchmarkStringEquality/bytes/equal/8/LLGo 2.745 ns/op -0.13 ns/op / -4.5% (better)
macOS BenchmarkStringEquality/bytes/first/1024/Go 6.519 ns/op +1.386 ns/op / +27.0% (worse)
macOS BenchmarkStringEquality/bytes/first/1024/LLGo 1.739 ns/op -0.204 ns/op / -10.5% (better)
macOS BenchmarkStringEquality/bytes/first/128/Go 5.999 ns/op +0.909 ns/op / +17.9% (worse)
macOS BenchmarkStringEquality/bytes/first/128/LLGo 1.723 ns/op -1.654 ns/op / -49.0% (better)
macOS BenchmarkStringEquality/bytes/first/8/Go 6.180 ns/op +1.002 ns/op / +19.4% (worse)
macOS BenchmarkStringEquality/bytes/first/8/LLGo 1.689 ns/op -0.136 ns/op / -7.5% (better)
macOS BenchmarkStringEquality/bytes/last/1024/Go 45.290 ns/op +10.86 ns/op / +31.5% (worse)
macOS BenchmarkStringEquality/bytes/last/1024/LLGo 23.850 ns/op -20.68 ns/op / -46.4% (better)
macOS BenchmarkStringEquality/bytes/last/128/Go 6.740 ns/op -1.597 ns/op / -19.2% (better)
macOS BenchmarkStringEquality/bytes/last/128/LLGo 4.096 ns/op -0.367 ns/op / -8.2% (better)
macOS BenchmarkStringEquality/bytes/last/8/Go 6.035 ns/op +0.903 ns/op / +17.6% (worse)
macOS BenchmarkStringEquality/bytes/last/8/LLGo 2.529 ns/op -0.119 ns/op / -4.5% (better)
macOS BenchmarkStringEquality/strings/equal/1024/Go 38.490 ns/op -0.78 ns/op / -2.0% (better)
macOS BenchmarkStringEquality/strings/equal/1024/LLGo 25.550 ns/op -8.7 ns/op / -25.4% (better)
macOS BenchmarkStringEquality/strings/equal/128/Go 9.328 ns/op +2.093 ns/op / +28.9% (worse)
macOS BenchmarkStringEquality/strings/equal/128/LLGo 4.877 ns/op -0.816 ns/op / -14.3% (better)
macOS BenchmarkStringEquality/strings/equal/8/Go 4.391 ns/op +0.296 ns/op / +7.2% (worse)
macOS BenchmarkStringEquality/strings/equal/8/LLGo 2.785 ns/op -0.811 ns/op / -22.6% (better)
macOS BenchmarkStringEquality/strings/first/1024/Go 6.005 ns/op +1.83 ns/op / +43.8% (worse)
macOS BenchmarkStringEquality/strings/first/1024/LLGo 1.696 ns/op -0.194 ns/op / -10.3% (better)
macOS BenchmarkStringEquality/strings/first/128/Go 7.320 ns/op +2.981 ns/op / +68.7% (worse)
macOS BenchmarkStringEquality/strings/first/128/LLGo 1.809 ns/op 0 ns/op / +0.0%
macOS BenchmarkStringEquality/strings/first/8/Go 3.877 ns/op -1.81 ns/op / -31.8% (better)
macOS BenchmarkStringEquality/strings/first/8/LLGo 1.831 ns/op -1.165 ns/op / -38.9% (better)
macOS BenchmarkStringEquality/strings/last/1024/Go 38.360 ns/op +5.28 ns/op / +16.0% (worse)
macOS BenchmarkStringEquality/strings/last/1024/LLGo 23.520 ns/op -11.25 ns/op / -32.4% (better)
macOS BenchmarkStringEquality/strings/last/128/Go 8.916 ns/op +2.944 ns/op / +49.3% (worse)
macOS BenchmarkStringEquality/strings/last/128/LLGo 4.112 ns/op -1.579 ns/op / -27.7% (better)
macOS BenchmarkStringEquality/strings/last/8/Go 5.591 ns/op +0.54 ns/op / +10.7% (worse)
macOS BenchmarkStringEquality/strings/last/8/LLGo 2.377 ns/op -0.121 ns/op / -4.8% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/1024/Go 12.460 ns/op -1.19 ns/op / -8.7% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/1024/LLGo 22 ns/op +0.16 ns/op / +0.7% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/128/Go 4.655 ns/op +0.377 ns/op / +8.8% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/128/LLGo 5.258 ns/op +0.01 ns/op / +0.2% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/8/Go 4.243 ns/op +0.326 ns/op / +8.3% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/8/LLGo 2.355 ns/op -0.474 ns/op / -16.8% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/1024/Go 4.008 ns/op +0.281 ns/op / +7.5% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/1024/LLGo 1.893 ns/op -0.227 ns/op / -10.7% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/128/Go 4.239 ns/op +0.013 ns/op / +0.3% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/128/LLGo 2.118 ns/op +0.158 ns/op / +8.1% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/8/Go 4.279 ns/op +1.108 ns/op / +34.9% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/8/LLGo 2.340 ns/op +0.189 ns/op / +8.8% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/1024/Go 11.930 ns/op +0.81 ns/op / +7.3% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/1024/LLGo 21.930 ns/op +0.35 ns/op / +1.6% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/128/Go 4.946 ns/op +0.422 ns/op / +9.3% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/128/LLGo 5.171 ns/op +0.018 ns/op / +0.3% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/8/Go 4.258 ns/op +0.667 ns/op / +18.6% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/8/LLGo 2.112 ns/op -0.029 ns/op / -1.4% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/1024/Go 11.390 ns/op -1.81 ns/op / -13.7% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/1024/LLGo 30.820 ns/op +0.01 ns/op / +0.03246% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/128/Go 5.016 ns/op +0.747 ns/op / +17.5% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/128/LLGo 4.448 ns/op -0.012 ns/op / -0.3% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/8/Go 3.926 ns/op +0.452 ns/op / +13.0% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/8/LLGo 2.106 ns/op +0.186 ns/op / +9.7% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/1024/Go 3.978 ns/op +0.223 ns/op / +5.9% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/1024/LLGo 1.482 ns/op -0.394 ns/op / -21.0% (better)
Windows MinGW BenchmarkStringEquality/strings/first/128/Go 4.709 ns/op +0.617 ns/op / +15.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/128/LLGo 1.478 ns/op -0.179 ns/op / -10.8% (better)
Windows MinGW BenchmarkStringEquality/strings/first/8/Go 4.159 ns/op +0.351 ns/op / +9.2% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/8/LLGo 1.467 ns/op -0.185 ns/op / -11.2% (better)
Windows MinGW BenchmarkStringEquality/strings/last/1024/Go 11.400 ns/op +0.69 ns/op / +6.4% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/1024/LLGo 30.180 ns/op +0.02 ns/op / +0.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/128/Go 4.891 ns/op +0.943 ns/op / +23.9% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/128/LLGo 3.755 ns/op +0.014 ns/op / +0.4% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/8/Go 4.210 ns/op +0.62 ns/op / +17.3% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/8/LLGo 2.106 ns/op -0.016 ns/op / -0.8% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/1024/Go 26.440 ns/op -0.33 ns/op / -1.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/1024/LLGo 28.540 ns/op -5.07 ns/op / -15.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/128/Go 8.258 ns/op -0.074 ns/op / -0.9% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/128/LLGo 6.633 ns/op -0.08 ns/op / -1.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/8/Go 6.017 ns/op -0.006 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/8/LLGo 3.764 ns/op -0.008 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/1024/Go 6.661 ns/op -0.052 ns/op / -0.8% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/1024/LLGo 3.188 ns/op +0.019 ns/op / +0.6% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/128/Go 6.682 ns/op +0.031 ns/op / +0.5% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/128/LLGo 3.168 ns/op -0.015 ns/op / -0.5% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/8/Go 5.869 ns/op +0.231 ns/op / +4.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/8/LLGo 3.182 ns/op -0.007 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/1024/Go 26.200 ns/op -0.18 ns/op / -0.7% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/1024/LLGo 28.270 ns/op +0.01 ns/op / +0.03539% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/128/Go 7.887 ns/op -0.07 ns/op / -0.9% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/128/LLGo 5.944 ns/op +0.114 ns/op / +2.0% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/8/Go 6.261 ns/op +0.226 ns/op / +3.7% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/8/LLGo 3.701 ns/op -0.005 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/1024/Go 23.610 ns/op -0.19 ns/op / -0.8% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/1024/LLGo 28.790 ns/op -3.79 ns/op / -11.6% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/128/Go 7.730 ns/op -0.089 ns/op / -1.1% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/128/LLGo 6.269 ns/op -0.06 ns/op / -0.9% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/8/Go 5.888 ns/op -0.002 ns/op / -0.03396% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/8/LLGo 3.681 ns/op -0.005 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/1024/Go 6.448 ns/op +0.128 ns/op / +2.0% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/1024/LLGo 3.165 ns/op +0.007 ns/op / +0.2% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/128/Go 6.415 ns/op +0.034 ns/op / +0.5% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/128/LLGo 3.169 ns/op +0.011 ns/op / +0.3% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/8/Go 5.487 ns/op -0.47 ns/op / -7.9% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/8/LLGo 3.163 ns/op -0.018 ns/op / -0.6% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/1024/Go 23.320 ns/op +0.2 ns/op / +0.9% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/last/1024/LLGo 28.250 ns/op 0 ns/op / +0.0%
Windows MinGW 386 BenchmarkStringEquality/strings/last/128/Go 7.460 ns/op -0.023 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/128/LLGo 5.814 ns/op -0.011 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/8/Go 5.962 ns/op -0.047 ns/op / -0.8% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/8/LLGo 3.675 ns/op +0.006 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/1024/Go 31.190 ns/op -0.01 ns/op / -0.03205% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/1024/LLGo 39.360 ns/op -0.23 ns/op / -0.6% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/128/Go 6.766 ns/op +0.038 ns/op / +0.6% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/128/LLGo 7.017 ns/op -0.039 ns/op / -0.6% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/8/Go 3.733 ns/op +0.009 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/8/LLGo 2.875 ns/op -0.001 ns/op / -0.03477% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/1024/Go 4.765 ns/op +0.056 ns/op / +1.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/1024/LLGo 1.763 ns/op -0.01 ns/op / -0.6% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/128/Go 4.800 ns/op -0.033 ns/op / -0.7% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/128/LLGo 1.746 ns/op +0.001 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/8/Go 3.545 ns/op +0.097 ns/op / +2.8% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/8/LLGo 1.736 ns/op +0.008 ns/op / +0.5% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/1024/Go 31.020 ns/op +0.05 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/1024/LLGo 39.320 ns/op +0.09 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/128/Go 6.731 ns/op +0.056 ns/op / +0.8% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/128/LLGo 6.794 ns/op +0.003 ns/op / +0.04418% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/8/Go 3.559 ns/op +0.123 ns/op / +3.6% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/8/LLGo 2.458 ns/op -0.004 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/1024/Go 27.390 ns/op -0.07 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/1024/LLGo 36.500 ns/op +0.13 ns/op / +0.4% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/128/Go 6.055 ns/op -0.012 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/128/LLGo 5.875 ns/op +0.032 ns/op / +0.5% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/8/Go 4.009 ns/op +0.174 ns/op / +4.5% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/8/LLGo 2.951 ns/op +0.032 ns/op / +1.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/1024/Go 4.466 ns/op -0.046 ns/op / -1.0% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/1024/LLGo 1.715 ns/op +0.024 ns/op / +1.4% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/128/Go 4.548 ns/op +0.015 ns/op / +0.3% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/128/LLGo 1.794 ns/op +0.067 ns/op / +3.9% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/8/Go 3.924 ns/op +0.064 ns/op / +1.7% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/8/LLGo 1.691 ns/op +0.003 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/1024/Go 27.170 ns/op +0.06 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/1024/LLGo 35.400 ns/op -0.24 ns/op / -0.7% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/128/Go 5.923 ns/op +0.011 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/128/LLGo 5.497 ns/op +0.026 ns/op / +0.5% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/8/Go 3.885 ns/op +0.012 ns/op / +0.3% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/8/LLGo 2.278 ns/op +0.013 ns/op / +0.6% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/1024/Go 21.110 ns/op -0.02 ns/op / -0.1% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/1024/LLGo 36.620 ns/op +0.72 ns/op / +2.0% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/128/Go 7.170 ns/op -0.138 ns/op / -1.9% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/128/LLGo 7.804 ns/op -0.096 ns/op / -1.2% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/8/Go 5.779 ns/op +0.693 ns/op / +13.6% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/8/LLGo 4.370 ns/op +0.448 ns/op / +11.4% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/1024/Go 5.397 ns/op +0.172 ns/op / +3.3% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/1024/LLGo 3.008 ns/op +0.022 ns/op / +0.7% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/128/Go 5.339 ns/op +0.175 ns/op / +3.4% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/128/LLGo 3 ns/op +0.099 ns/op / +3.4% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/8/Go 5.118 ns/op -0.118 ns/op / -2.3% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/8/LLGo 3.012 ns/op +0.123 ns/op / +4.3% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/1024/Go 20.570 ns/op -0.27 ns/op / -1.3% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/1024/LLGo 36.920 ns/op +1.1 ns/op / +3.1% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/128/Go 6.235 ns/op -0.281 ns/op / -4.3% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/128/LLGo 7.743 ns/op -0.02 ns/op / -0.3% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/8/Go 5.376 ns/op +0.351 ns/op / +7.0% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/8/LLGo 3.627 ns/op +0.033 ns/op / +0.9% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/1024/Go 16.760 ns/op -0.21 ns/op / -1.2% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/1024/LLGo 33.120 ns/op -0.19 ns/op / -0.6% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/128/Go 7.139 ns/op +0.043 ns/op / +0.6% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/128/LLGo 6.900 ns/op +0.042 ns/op / +0.6% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/8/Go 5.872 ns/op +0.846 ns/op / +16.8% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/8/LLGo 3.327 ns/op -0.09 ns/op / -2.6% (better)
Windows MSVC BenchmarkStringEquality/strings/first/1024/Go 5.079 ns/op -0.036 ns/op / -0.7% (better)
Windows MSVC BenchmarkStringEquality/strings/first/1024/LLGo 2.521 ns/op -0.12 ns/op / -4.5% (better)
Windows MSVC BenchmarkStringEquality/strings/first/128/Go 4.740 ns/op -0.51 ns/op / -9.7% (better)
Windows MSVC BenchmarkStringEquality/strings/first/128/LLGo 2.618 ns/op +0.026 ns/op / +1.0% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/8/Go 5.515 ns/op +0.446 ns/op / +8.8% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/8/LLGo 2.449 ns/op -0.205 ns/op / -7.7% (better)
Windows MSVC BenchmarkStringEquality/strings/last/1024/Go 16.220 ns/op -0.08 ns/op / -0.5% (better)
Windows MSVC BenchmarkStringEquality/strings/last/1024/LLGo 32.770 ns/op +0.13 ns/op / +0.4% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/128/Go 6.207 ns/op -0.306 ns/op / -4.7% (better)
Windows MSVC BenchmarkStringEquality/strings/last/128/LLGo 6.717 ns/op +0.186 ns/op / +2.8% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/8/Go 5.680 ns/op +0.745 ns/op / +15.1% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/8/LLGo 3.312 ns/op -0.006 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/1024/Go 19.990 ns/op +1.29 ns/op / +6.9% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/1024/LLGo 52.250 ns/op -1.15 ns/op / -2.2% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/128/Go 5.840 ns/op +0.443 ns/op / +8.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/128/LLGo 9.423 ns/op -0.209 ns/op / -2.2% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/8/Go 4.372 ns/op +0.398 ns/op / +10.0% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/8/LLGo 2.679 ns/op -0.009 ns/op / -0.3% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/1024/Go 4.559 ns/op +0.324 ns/op / +7.7% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/1024/LLGo 2.208 ns/op -0.005 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/128/Go 4.528 ns/op +0.303 ns/op / +7.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/128/LLGo 2.158 ns/op -0.05 ns/op / -2.3% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/8/Go 4.016 ns/op +0.102 ns/op / +2.6% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/8/LLGo 2.112 ns/op -0.264 ns/op / -11.1% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/1024/Go 19.600 ns/op +1 ns/op / +5.4% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/1024/LLGo 52.540 ns/op -1.53 ns/op / -2.8% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/128/Go 5.530 ns/op +0.207 ns/op / +3.9% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/128/LLGo 8.762 ns/op -0.552 ns/op / -5.9% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/8/Go 4.436 ns/op +0.531 ns/op / +13.6% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/8/LLGo 2.485 ns/op -0.155 ns/op / -5.9% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/1024/Go 18.910 ns/op +0.09 ns/op / +0.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/1024/LLGo 49.390 ns/op +0.17 ns/op / +0.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/128/Go 5.347 ns/op +0.572 ns/op / +12.0% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/128/LLGo 8.796 ns/op -0.369 ns/op / -4.0% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/8/Go 4.177 ns/op +0.285 ns/op / +7.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/8/LLGo 2.598 ns/op -0.069 ns/op / -2.6% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/1024/Go 4.546 ns/op +0.436 ns/op / +10.6% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/1024/LLGo 2.205 ns/op -0.023 ns/op / -1.0% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/128/Go 4.369 ns/op +0.262 ns/op / +6.4% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/128/LLGo 2.192 ns/op -0.023 ns/op / -1.0% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/8/Go 3.747 ns/op +0.194 ns/op / +5.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/8/LLGo 2.305 ns/op +0.074 ns/op / +3.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/1024/Go 18.620 ns/op +1.12 ns/op / +6.4% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/1024/LLGo 48.340 ns/op -1.24 ns/op / -2.5% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/last/128/Go 5.234 ns/op +0.281 ns/op / +5.7% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/128/LLGo 8.621 ns/op -0.166 ns/op / -1.9% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/last/8/Go 4.320 ns/op +0.427 ns/op / +11.0% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/8/LLGo 2.234 ns/op -0.161 ns/op / -6.7% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/1024/Go 31.160 ns/op -0.14 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/1024/LLGo 38.970 ns/op -0.37 ns/op / -0.9% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/128/Go 6.713 ns/op -0.028 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/128/LLGo 7.030 ns/op +0.002 ns/op / +0.02846% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/8/Go 3.689 ns/op +0.011 ns/op / +0.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/8/LLGo 2.858 ns/op -0.054 ns/op / -1.9% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/1024/Go 4.752 ns/op -0.008 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/1024/LLGo 1.800 ns/op -0.192 ns/op / -9.6% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/128/Go 4.767 ns/op -0.004 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/128/LLGo 1.773 ns/op -0.003 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/8/Go 3.464 ns/op +0.047 ns/op / +1.4% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/8/LLGo 1.774 ns/op -0.029 ns/op / -1.6% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/1024/Go 31.010 ns/op -0.01 ns/op / -0.03224% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/1024/LLGo 38.850 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/128/Go 6.648 ns/op -0.047 ns/op / -0.7% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/128/LLGo 6.735 ns/op -0.007 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/8/Go 3.551 ns/op +0.065 ns/op / +1.9% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/8/LLGo 2.507 ns/op +0.037 ns/op / +1.5% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/1024/Go 27.400 ns/op -0.1 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/1024/LLGo 36 ns/op +0.14 ns/op / +0.4% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/128/Go 6.078 ns/op +0.021 ns/op / +0.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/128/LLGo 5.890 ns/op +0.171 ns/op / +3.0% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/8/Go 3.838 ns/op -0.117 ns/op / -3.0% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/8/LLGo 2.375 ns/op +0.028 ns/op / +1.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/1024/Go 4.479 ns/op -0.048 ns/op / -1.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/1024/LLGo 1.571 ns/op +0.047 ns/op / +3.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/128/Go 4.547 ns/op +0.053 ns/op / +1.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/128/LLGo 1.573 ns/op -0.009 ns/op / -0.6% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/8/Go 3.868 ns/op +0.011 ns/op / +0.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/8/LLGo 1.574 ns/op -0.024 ns/op / -1.5% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/1024/Go 27.090 ns/op -0.07 ns/op / -0.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/1024/LLGo 35.390 ns/op -0.03 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/128/Go 5.920 ns/op +0.007 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/128/LLGo 5.467 ns/op -0.027 ns/op / -0.5% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/8/Go 3.907 ns/op +0.03 ns/op / +0.8% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/8/LLGo 1.956 ns/op +0.009 ns/op / +0.5% (worse)

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.155 s -158.8 ms / -12.1% (better) 1.286 ms -33.7 us / -2.6% (better)
Linux cprintf-lto 8240 B 0 B / +0.0% 368 B 0 B / +0.0% 1.100 s -63.91 ms / -5.5% (better) 1.313 ms -97.98 us / -6.9% (better)
Linux fmtprintf 1944656 B +128 B / +0.006583% (worse) 269915 B 0 B / +0.0% 6.870 s -747.5 ms / -9.8% (better) 3.415 ms -75.74 us / -2.2% (better)
Linux fmtprintf-lto 1132336 B -32 B / -0.002826% (better) 220642 B 0 B / +0.0% 16.732 s -4.253 s / -20.3% (better) 3.303 ms -574.1 us / -14.8% (better)
Linux println 261288 B -80 B / -0.03061% (better) 19138 B 0 B / +0.0% 1.333 s +230.5 ms / +20.9% (worse) 1.833 ms +34.84 us / +1.9% (worse)
Linux println-lto 102968 B -8 B / -0.007769% (better) 15723 B 0 B / +0.0% 2.005 s -17.33 ms / -0.9% (better) 1.767 ms -659.3 us / -27.2% (better)
macOS cprintf 50944 B 0 B / +0.0% 4409 B 0 B / +0.0% 1.459 s -109.3 ms / -7.0% (better) 3.976 ms -5.297 ms / -57.1% (better)
macOS cprintf-lto 50608 B 0 B / +0.0% 161 B 0 B / +0.0% 1.587 s -370.7 ms / -18.9% (better) 5.283 ms -1.336 ms / -20.2% (better)
macOS fmtprintf 1233696 B 0 B / +0.0% 675953 B 0 B / +0.0% 8.349 s +17.1 ms / +0.2% (worse) 9.464 ms +308.7 us / +3.4% (worse)
macOS fmtprintf-lto 871600 B 0 B / +0.0% 521157 B 0 B / +0.0% 14.602 s +2.278 s / +18.5% (worse) 7.725 ms +2.645 ms / +52.1% (worse)
macOS println 100592 B 0 B / +0.0% 26339 B 0 B / +0.0% 1.937 s +62.7 ms / +3.3% (worse) 9.008 ms +2.021 ms / +28.9% (worse)
macOS println-lto 85632 B 0 B / +0.0% 22487 B 0 B / +0.0% 1.894 s +18.02 ms / +1.0% (worse) 7.379 ms +2.682 ms / +57.1% (worse)
Windows MinGW cprintf 749568 B 0 B / +0.0% 4230 B 0 B / +0.0% 1.519 s -17.78 ms / -1.2% (better) 2.800 ms +78.6 us / +2.9% (worse)
Windows MinGW cprintf-lto 60928 B 0 B / +0.0% 4182 B 0 B / +0.0% 1.519 s +56.26 ms / +3.8% (worse) 2.770 ms +48.2 us / +1.8% (worse)
Windows MinGW fmtprintf 5159424 B 0 B / +0.0% 361910 B 0 B / +0.0% 5.203 s +253.4 ms / +5.1% (worse) 8.368 ms +1.549 ms / +22.7% (worse)
Windows MinGW fmtprintf-lto 2786304 B 0 B / +0.0% 307030 B 0 B / +0.0% 8.773 s +682.7 ms / +8.4% (worse) 8.741 ms +1.133 ms / +14.9% (worse)
Windows MinGW println 811520 B 0 B / +0.0% 27382 B 0 B / +0.0% 1.608 s +103 ms / +6.8% (worse) 5.415 ms +343.9 us / +6.8% (worse)
Windows MinGW println-lto 233472 B 0 B / +0.0% 22774 B 0 B / +0.0% 1.821 s +86.84 ms / +5.0% (worse) 5.240 ms +312.4 us / +6.3% (worse)
Windows MinGW 386 cprintf 754688 B 0 B / +0.0% 22694 B 0 B / +0.0% 1.593 s -55.56 ms / -3.4% (better) 7.031 ms -81.8 us / -1.2% (better)
Windows MinGW 386 cprintf-lto 282624 B 0 B / +0.0% 19476 B 0 B / +0.0% 1.893 s +18.76 ms / +1.0% (worse) 7.025 ms -698.1 us / -9.0% (better)
Windows MinGW 386 fmtprintf 4510208 B 0 B / +0.0% 284832 B 0 B / +0.0% 5.454 s -96.12 ms / -1.7% (better) 9.405 ms -648.5 us / -6.5% (better)
Windows MinGW 386 fmtprintf-lto 2903040 B 0 B / +0.0% 256706 B 0 B / +0.0% 8.946 s +54.26 ms / +0.6% (worse) 9.748 ms -725.1 us / -6.9% (better)
Windows MinGW 386 println 753152 B 0 B / +0.0% 22624 B 0 B / +0.0% 1.593 s -24.76 ms / -1.5% (better) 7.349 ms +290.7 us / +4.1% (worse)
Windows MinGW 386 println-lto 282112 B 0 B / +0.0% 19410 B 0 B / +0.0% 1.853 s +9.197 ms / +0.5% (worse) 7.345 ms +71.2 us / +1.0% (worse)
Windows MinGW ARM64 cprintf 756224 B 0 B / +0.0% 4028 B 0 B / +0.0% 2.124 s +73.31 ms / +3.6% (worse) 7.449 ms +1.613 ms / +27.6% (worse)
Windows MinGW ARM64 cprintf-lto 60416 B 0 B / +0.0% 3984 B 0 B / +0.0% 2.122 s +28.14 ms / +1.3% (worse) 6.165 ms +310.3 us / +5.3% (worse)
Windows MinGW ARM64 fmtprintf 5096960 B 0 B / +0.0% 302056 B 0 B / +0.0% 6.503 s +315.1 ms / +5.1% (worse) 14.314 ms +1.452 ms / +11.3% (worse)
Windows MinGW ARM64 fmtprintf-lto 2903040 B 0 B / +0.0% 263776 B 0 B / +0.0% 10.325 s +652.2 ms / +6.7% (worse) 14.504 ms +1.137 ms / +8.5% (worse)
Windows MinGW ARM64 println 816640 B 0 B / +0.0% 25568 B 0 B / +0.0% 2.079 s +31.72 ms / +1.5% (worse) 10.328 ms -307.2 us / -2.9% (better)
Windows MinGW ARM64 println-lto 237056 B 0 B / +0.0% 21880 B 0 B / +0.0% 2.360 s +21.35 ms / +0.9% (worse) 10.094 ms +223.8 us / +2.3% (worse)
Windows MSVC cprintf 993792 B 0 B / +0.0% 66003 B 0 B / +0.0% 2.008 s +195.6 ms / +10.8% (worse) 3.905 ms +210.3 us / +5.7% (worse)
Windows MSVC cprintf-lto 308736 B 0 B / +0.0% 65971 B 0 B / +0.0% 1.841 s -43.7 ms / -2.3% (better) 3.457 ms -571.7 us / -14.2% (better)
Windows MSVC fmtprintf 5459456 B -512 B / -0.009377% (better) 457990 B 0 B / +0.0% 6.167 s -16.57 ms / -0.3% (better) 11.990 ms -221.5 us / -1.8% (better)
Windows MSVC fmtprintf-lto 3109888 B 0 B / +0.0% 405494 B 0 B / +0.0% 10.006 s -19.54 ms / -0.2% (better) 11.575 ms -1.054 ms / -8.3% (better)
Windows MSVC println 1125888 B 0 B / +0.0% 123526 B 0 B / +0.0% 1.854 s +30.64 ms / +1.7% (worse) 7.569 ms +207.7 us / +2.8% (worse)
Windows MSVC println-lto 553984 B 0 B / +0.0% 119446 B 0 B / +0.0% 2.053 s -26.39 ms / -1.3% (better) 7.500 ms +127.4 us / +1.7% (worse)
Windows MSVC 386 cprintf 664064 B 0 B / +0.0% 21330 B 0 B / +0.0% 1.354 s -92.39 ms / -6.4% (better) 6.733 ms -1.535 ms / -18.6% (better)
Windows MSVC 386 cprintf-lto 221696 B 0 B / +0.0% 18825 B 0 B / +0.0% 1.531 s -298.5 ms / -16.3% (better) 6.291 ms -1.961 ms / -23.8% (better)
Windows MSVC 386 fmtprintf 4238336 B 0 B / +0.0% 268294 B 0 B / +0.0% 4.336 s -785.1 ms / -15.3% (better) 8.535 ms -2.075 ms / -19.6% (better)
Windows MSVC 386 fmtprintf-lto 2717184 B 0 B / +0.0% 236209 B 0 B / +0.0% 7.498 s +169.8 ms / +2.3% (worse) 9.341 ms +202.9 us / +2.2% (worse)
Windows MSVC 386 println 662016 B 0 B / +0.0% 21276 B 0 B / +0.0% 1.340 s -117.2 ms / -8.0% (better) 6.365 ms -2.049 ms / -24.4% (better)
Windows MSVC 386 println-lto 220160 B 0 B / +0.0% 18755 B 0 B / +0.0% 1.501 s -162.7 ms / -9.8% (better) 7.347 ms -450.2 us / -5.8% (better)
Windows MSVC ARM64 cprintf 758784 B 0 B / +0.0% 4240 B 0 B / +0.0% 2.025 s +81.84 ms / +4.2% (worse) 7.614 ms +638.5 us / +9.2% (worse)
Windows MSVC ARM64 cprintf-lto 66048 B 0 B / +0.0% 4140 B 0 B / +0.0% 2.039 s +52.27 ms / +2.6% (worse) 6.934 ms +110.1 us / +1.6% (worse)
Windows MSVC ARM64 fmtprintf 5093376 B 0 B / +0.0% 302380 B 0 B / +0.0% 6.209 s -81.74 ms / -1.3% (better) 15.479 ms -103 us / -0.7% (better)
Windows MSVC ARM64 fmtprintf-lto 2910720 B 0 B / +0.0% 264720 B 0 B / +0.0% 9.941 s +156.3 ms / +1.6% (worse) 16.644 ms +1.845 ms / +12.5% (worse)
Windows MSVC ARM64 println 819200 B 0 B / +0.0% 26052 B 0 B / +0.0% 2.025 s +73.77 ms / +3.8% (worse) 13.140 ms +1.424 ms / +12.2% (worse)
Windows MSVC ARM64 println-lto 242688 B 0 B / +0.0% 22432 B 0 B / +0.0% 2.311 s +95.07 ms / +4.3% (worse) 12.884 ms +850.9 us / +7.1% (worse)
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 205.500 ns/op +3.1 ns/op / +1.5% (worse)
Linux BenchmarkMergeLinkerFlags 136.200 ns/op +4.7 ns/op / +3.6% (worse)
Linux BenchmarkChannelBuffered 71.980 ns/op -2.63 ns/op / -3.5% (better)
Linux BenchmarkChannelHandoff 13448 ns/op -686 ns/op / -4.9% (better)
Linux BenchmarkDefer 16.190 ns/op -0.05 ns/op / -0.3% (better)
Linux BenchmarkDirectCall 1.165 ns/op -0.029 ns/op / -2.4% (better)
Linux BenchmarkGlobalRead 1.941 ns/op -0.019 ns/op / -1.0% (better)
Linux BenchmarkGlobalWrite 7.757 ns/op -0.028 ns/op / -0.4% (better)
Linux BenchmarkGoroutine 27873 ns/op +5120 ns/op / +22.5% (worse)
Linux BenchmarkInterfaceCall 4.670 ns/op -0.044 ns/op / -0.9% (better)
Linux BenchmarkRuntimeGetG 2.603 ns/op +0.153 ns/op / +6.2% (worse)
macOS BenchmarkLookupPCRandom 16.730 ns/op -0.5 ns/op / -2.9% (better)
macOS BenchmarkMergeCompilerFlags 114.800 ns/op -55.1 ns/op / -32.4% (better)
macOS BenchmarkMergeLinkerFlags 107.500 ns/op -6 ns/op / -5.3% (better)
macOS BenchmarkChannelBuffered 37.090 ns/op -4.72 ns/op / -11.3% (better)
macOS BenchmarkChannelHandoff 7542 ns/op -955 ns/op / -11.2% (better)
macOS BenchmarkDefer 15.800 ns/op +0.6 ns/op / +3.9% (worse)
macOS BenchmarkDirectCall 1.171 ns/op -0.2 ns/op / -14.6% (better)
macOS BenchmarkGlobalRead 1.175 ns/op -0.144 ns/op / -10.9% (better)
macOS BenchmarkGlobalWrite 1.385 ns/op -0.198 ns/op / -12.5% (better)
macOS BenchmarkGoroutine 82798 ns/op +5773 ns/op / +7.5% (worse)
macOS BenchmarkInterfaceCall 5.188 ns/op +0.14 ns/op / +2.8% (worse)
macOS BenchmarkRuntimeGetG 2.635 ns/op -0.241 ns/op / -8.4% (better)
Windows MinGW BenchmarkLookupPCRandom 7.481 ns/op +0.218 ns/op / +3.0% (worse)
Windows MinGW BenchmarkMergeCompilerFlags 304.900 ns/op +17.9 ns/op / +6.2% (worse)
Windows MinGW BenchmarkMergeLinkerFlags 271.500 ns/op +2.8 ns/op / +1.0% (worse)
Windows MinGW BenchmarkChannelBuffered 39.110 ns/op -0.61 ns/op / -1.5% (better)
Windows MinGW BenchmarkChannelHandoff 626.300 ns/op -35.6 ns/op / -5.4% (better)
Windows MinGW BenchmarkDefer 9.037 ns/op -0.045 ns/op / -0.5% (better)
Windows MinGW BenchmarkDirectCall 0.972 ns/op +0.0319 ns/op / +3.4% (worse)
Windows MinGW BenchmarkGlobalRead 0.921 ns/op -0.0372 ns/op / -3.9% (better)
Windows MinGW BenchmarkGlobalWrite 4.693 ns/op +0.001 ns/op / +0.02131% (worse)
Windows MinGW BenchmarkGoroutine 47127 ns/op -3242 ns/op / -6.4% (better)
Windows MinGW BenchmarkInterfaceCall 4.227 ns/op -0.018 ns/op / -0.4% (better)
Windows MinGW BenchmarkRuntimeGetG 0.929 ns/op -0.0415 ns/op / -4.3% (better)
Windows MinGW 386 BenchmarkLookupPCRandom 21.660 ns/op +0.02 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkMergeCompilerFlags 608.900 ns/op +25 ns/op / +4.3% (worse)
Windows MinGW 386 BenchmarkMergeLinkerFlags 531.200 ns/op -18.3 ns/op / -3.3% (better)
Windows MinGW 386 BenchmarkChannelBuffered 36.910 ns/op +0.05 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkChannelHandoff 555.100 ns/op +3.7 ns/op / +0.7% (worse)
Windows MinGW 386 BenchmarkDefer 14.100 ns/op -0.02 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkDirectCall 1.359 ns/op +0.001 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkGlobalRead 1.357 ns/op -0.001 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkGlobalWrite 6.988 ns/op +0.01 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkGoroutine 77059 ns/op -785 ns/op / -1.0% (better)
Windows MinGW 386 BenchmarkInterfaceCall 6.523 ns/op +0.001 ns/op / +0.01533% (worse)
Windows MinGW 386 BenchmarkRuntimeGetG 1.631 ns/op -0.001 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkLookupPCRandom 12.120 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 BenchmarkMergeCompilerFlags 574.700 ns/op -6.9 ns/op / -1.2% (better)
Windows MinGW ARM64 BenchmarkMergeLinkerFlags 538 ns/op +3.9 ns/op / +0.7% (worse)
Windows MinGW ARM64 BenchmarkChannelBuffered 43.290 ns/op -0.78 ns/op / -1.8% (better)
Windows MinGW ARM64 BenchmarkChannelHandoff 1688 ns/op +11 ns/op / +0.7% (worse)
Windows MinGW ARM64 BenchmarkDefer 11.820 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 BenchmarkDirectCall 0.663 ns/op -0.0004 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkGlobalRead 0.590 ns/op +0.0001 ns/op / +0.01695% (worse)
Windows MinGW ARM64 BenchmarkGlobalWrite 0.885 ns/op +0.0003 ns/op / +0.03393% (worse)
Windows MinGW ARM64 BenchmarkGoroutine 63085 ns/op +5221 ns/op / +9.0% (worse)
Windows MinGW ARM64 BenchmarkInterfaceCall 3.859 ns/op -0.01 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkRuntimeGetG 1.807 ns/op +0.007 ns/op / +0.4% (worse)
Windows MSVC BenchmarkLookupPCRandom 11.280 ns/op -0.17 ns/op / -1.5% (better)
Windows MSVC BenchmarkMergeCompilerFlags 559.900 ns/op -15 ns/op / -2.6% (better)
Windows MSVC BenchmarkMergeLinkerFlags 498.300 ns/op -16.9 ns/op / -3.3% (better)
Windows MSVC BenchmarkChannelBuffered 57.230 ns/op +0.46 ns/op / +0.8% (worse)
Windows MSVC BenchmarkChannelHandoff 3916 ns/op +1466 ns/op / +59.8% (worse)
Windows MSVC BenchmarkDefer 12.160 ns/op +0.26 ns/op / +2.2% (worse)
Windows MSVC BenchmarkDirectCall 1.110 ns/op +0.078 ns/op / +7.6% (worse)
Windows MSVC BenchmarkGlobalRead 0.994 ns/op -0.1821 ns/op / -15.5% (better)
Windows MSVC BenchmarkGlobalWrite 8.462 ns/op +0.072 ns/op / +0.9% (worse)
Windows MSVC BenchmarkGoroutine 77354 ns/op +4681 ns/op / +6.4% (worse)
Windows MSVC BenchmarkInterfaceCall 5.054 ns/op +0.105 ns/op / +2.1% (worse)
Windows MSVC BenchmarkRuntimeGetG 1.941 ns/op +0.01 ns/op / +0.5% (worse)
Windows MSVC 386 BenchmarkLookupPCRandom 15.880 ns/op +0.87 ns/op / +5.8% (worse)
Windows MSVC 386 BenchmarkMergeCompilerFlags 389.300 ns/op +24.6 ns/op / +6.7% (worse)
Windows MSVC 386 BenchmarkMergeLinkerFlags 373.300 ns/op +15.9 ns/op / +4.4% (worse)
Windows MSVC 386 BenchmarkChannelBuffered 47.070 ns/op +1.05 ns/op / +2.3% (worse)
Windows MSVC 386 BenchmarkChannelHandoff 600.300 ns/op -103.7 ns/op / -14.7% (better)
Windows MSVC 386 BenchmarkDefer 8.414 ns/op +0.316 ns/op / +3.9% (worse)
Windows MSVC 386 BenchmarkDirectCall 0.933 ns/op +0.038 ns/op / +4.2% (worse)
Windows MSVC 386 BenchmarkGlobalRead 0.946 ns/op +0.0362 ns/op / +4.0% (worse)
Windows MSVC 386 BenchmarkGlobalWrite 8.244 ns/op +0.223 ns/op / +2.8% (worse)
Windows MSVC 386 BenchmarkGoroutine 54445 ns/op -258 ns/op / -0.5% (better)
Windows MSVC 386 BenchmarkInterfaceCall 3.742 ns/op +0.152 ns/op / +4.2% (worse)
Windows MSVC 386 BenchmarkRuntimeGetG 0.956 ns/op -0.0306 ns/op / -3.1% (better)
Windows MSVC ARM64 BenchmarkLookupPCRandom 12.040 ns/op -0.02 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkMergeCompilerFlags 568.200 ns/op +3.7 ns/op / +0.7% (worse)
Windows MSVC ARM64 BenchmarkMergeLinkerFlags 538.800 ns/op +7 ns/op / +1.3% (worse)
Windows MSVC ARM64 BenchmarkChannelBuffered 46.530 ns/op -0.23 ns/op / -0.5% (better)
Windows MSVC ARM64 BenchmarkChannelHandoff 1312 ns/op -98 ns/op / -7.0% (better)
Windows MSVC ARM64 BenchmarkDefer 11.710 ns/op -0.5 ns/op / -4.1% (better)
Windows MSVC ARM64 BenchmarkDirectCall 0.590 ns/op +0.0001 ns/op / +0.01696% (worse)
Windows MSVC ARM64 BenchmarkGlobalRead 0.663 ns/op +0.0001 ns/op / +0.01508% (worse)
Windows MSVC ARM64 BenchmarkGlobalWrite 3.751 ns/op -0.006 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkGoroutine 56994 ns/op -1603 ns/op / -2.7% (better)
Windows MSVC ARM64 BenchmarkInterfaceCall 3.845 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkRuntimeGetG 1.804 ns/op +0.035 ns/op / +2.0% (worse)
Timer runtime benchmarks
Platform Operation and runtime ns/op vs base
Linux AfterFuncZeroDelivery/Go 915.100 ns/op -12.7 ns/op / -1.4% (better)
Linux AfterFuncZeroDelivery/LLGo 42601 ns/op +3525 ns/op / +9.0% (worse)
Linux CreateStop/Go 295.500 ns/op -9 ns/op / -3.0% (better)
Linux CreateStop/LLGo 1203 ns/op -159 ns/op / -11.7% (better)
Linux RearmStopped/Go 116.300 ns/op +1.1 ns/op / +1.0% (worse)
Linux RearmStopped/LLGo 922.900 ns/op -83.1 ns/op / -8.3% (better)
Linux ResetActive/Go 68.930 ns/op +1.13 ns/op / +1.7% (worse)
Linux ResetActive/LLGo 690 ns/op -77.6 ns/op / -10.1% (better)
Linux ResetHeap1024/Go 67.260 ns/op -0.17 ns/op / -0.3% (better)
Linux ResetHeap1024/LLGo 139.500 ns/op +4.1 ns/op / +3.0% (worse)
macOS AfterFuncZeroDelivery/Go 857.200 ns/op +329.7 ns/op / +62.5% (worse)
macOS AfterFuncZeroDelivery/LLGo 80728 ns/op +26574 ns/op / +49.1% (worse)
macOS CreateStop/Go 218.100 ns/op +5 ns/op / +2.3% (worse)
macOS CreateStop/LLGo 745.100 ns/op +115.3 ns/op / +18.3% (worse)
macOS RearmStopped/Go 75.830 ns/op +2.78 ns/op / +3.8% (worse)
macOS RearmStopped/LLGo 328 ns/op +122.3 ns/op / +59.5% (worse)
macOS ResetActive/Go 63.930 ns/op +5.53 ns/op / +9.5% (worse)
macOS ResetActive/LLGo 122.800 ns/op +9.2 ns/op / +8.1% (worse)
macOS ResetHeap1024/Go 71.630 ns/op +16.97 ns/op / +31.0% (worse)
macOS ResetHeap1024/LLGo 139.400 ns/op +64.56 ns/op / +86.3% (worse)
Windows MinGW AfterFuncZeroDelivery/Go 437.200 ns/op +22.4 ns/op / +5.4% (worse)
Windows MinGW AfterFuncZeroDelivery/LLGo 92789 ns/op +1567 ns/op / +1.7% (worse)
Windows MinGW CreateStop/Go 123.100 ns/op +1.7 ns/op / +1.4% (worse)
Windows MinGW CreateStop/LLGo 502.200 ns/op +145.6 ns/op / +40.8% (worse)
Windows MinGW RearmStopped/Go 46.830 ns/op -0.48 ns/op / -1.0% (better)
Windows MinGW RearmStopped/LLGo 156.600 ns/op -113.9 ns/op / -42.1% (better)
Windows MinGW ResetActive/Go 21.650 ns/op +1.09 ns/op / +5.3% (worse)
Windows MinGW ResetActive/LLGo 379.800 ns/op -48.6 ns/op / -11.3% (better)
Windows MinGW ResetHeap1024/Go 21.210 ns/op +0.65 ns/op / +3.2% (worse)
Windows MinGW ResetHeap1024/LLGo 77.410 ns/op -4.52 ns/op / -5.5% (better)
Windows MinGW 386 AfterFuncZeroDelivery/Go 777.900 ns/op +3.4 ns/op / +0.4% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/LLGo 142782 ns/op -2786 ns/op / -1.9% (better)
Windows MinGW 386 CreateStop/Go 167.200 ns/op -1.2 ns/op / -0.7% (better)
Windows MinGW 386 CreateStop/LLGo 364.500 ns/op +5.1 ns/op / +1.4% (worse)
Windows MinGW 386 RearmStopped/Go 56.670 ns/op -0.42 ns/op / -0.7% (better)
Windows MinGW 386 RearmStopped/LLGo 227.200 ns/op +7.1 ns/op / +3.2% (worse)
Windows MinGW 386 ResetActive/Go 32.640 ns/op -0.01 ns/op / -0.03063% (better)
Windows MinGW 386 ResetActive/LLGo 845.100 ns/op +653.8 ns/op / +341.8% (worse)
Windows MinGW 386 ResetHeap1024/Go 32.910 ns/op +0.04 ns/op / +0.1% (worse)
Windows MinGW 386 ResetHeap1024/LLGo 122.400 ns/op -0.3 ns/op / -0.2% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/Go 659.900 ns/op -5.9 ns/op / -0.9% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/LLGo 141211 ns/op +226 ns/op / +0.2% (worse)
Windows MinGW ARM64 CreateStop/Go 197.700 ns/op -0.9 ns/op / -0.5% (better)
Windows MinGW ARM64 CreateStop/LLGo 291.300 ns/op -54.3 ns/op / -15.7% (better)
Windows MinGW ARM64 RearmStopped/Go 70.530 ns/op -0.08 ns/op / -0.1% (better)
Windows MinGW ARM64 RearmStopped/LLGo 163.300 ns/op -0.5 ns/op / -0.3% (better)
Windows MinGW ARM64 ResetActive/Go 31.060 ns/op +0.09 ns/op / +0.3% (worse)
Windows MinGW ARM64 ResetActive/LLGo 102.600 ns/op +1.5 ns/op / +1.5% (worse)
Windows MinGW ARM64 ResetHeap1024/Go 31.090 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 ResetHeap1024/LLGo 92.030 ns/op -0.49 ns/op / -0.5% (better)
Windows MSVC AfterFuncZeroDelivery/Go 698.100 ns/op +5 ns/op / +0.7% (worse)
Windows MSVC AfterFuncZeroDelivery/LLGo 146720 ns/op -1099 ns/op / -0.7% (better)
Windows MSVC CreateStop/Go 183.500 ns/op -5.1 ns/op / -2.7% (better)
Windows MSVC CreateStop/LLGo 1140 ns/op -105 ns/op / -8.4% (better)
Windows MSVC RearmStopped/Go 68.950 ns/op -1.65 ns/op / -2.3% (better)
Windows MSVC RearmStopped/LLGo 249.900 ns/op -2.6 ns/op / -1.0% (better)
Windows MSVC ResetActive/Go 30.570 ns/op -0.32 ns/op / -1.0% (better)
Windows MSVC ResetActive/LLGo 404.800 ns/op +74.5 ns/op / +22.6% (worse)
Windows MSVC ResetHeap1024/Go 31.290 ns/op -0.09 ns/op / -0.3% (better)
Windows MSVC ResetHeap1024/LLGo 100.900 ns/op +3.11 ns/op / +3.2% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/Go 609.600 ns/op -10.1 ns/op / -1.6% (better)
Windows MSVC 386 AfterFuncZeroDelivery/LLGo 106795 ns/op +6244 ns/op / +6.2% (worse)
Windows MSVC 386 CreateStop/Go 159.900 ns/op +4.5 ns/op / +2.9% (worse)
Windows MSVC 386 CreateStop/LLGo 464.100 ns/op -32.8 ns/op / -6.6% (better)
Windows MSVC 386 RearmStopped/Go 61.760 ns/op +1.94 ns/op / +3.2% (worse)
Windows MSVC 386 RearmStopped/LLGo 287.300 ns/op -54.7 ns/op / -16.0% (better)
Windows MSVC 386 ResetActive/Go 29.310 ns/op +0.58 ns/op / +2.0% (worse)
Windows MSVC 386 ResetActive/LLGo 688.200 ns/op +27.6 ns/op / +4.2% (worse)
Windows MSVC 386 ResetHeap1024/Go 29.730 ns/op +1.56 ns/op / +5.5% (worse)
Windows MSVC 386 ResetHeap1024/LLGo 93.650 ns/op +3.65 ns/op / +4.1% (worse)
Windows MSVC ARM64 AfterFuncZeroDelivery/Go 655.700 ns/op -15.8 ns/op / -2.4% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/LLGo 144498 ns/op +5458 ns/op / +3.9% (worse)
Windows MSVC ARM64 CreateStop/Go 195.900 ns/op -3.3 ns/op / -1.7% (better)
Windows MSVC ARM64 CreateStop/LLGo 328.200 ns/op +4.9 ns/op / +1.5% (worse)
Windows MSVC ARM64 RearmStopped/Go 70.640 ns/op +0.02 ns/op / +0.02832% (worse)
Windows MSVC ARM64 RearmStopped/LLGo 177.100 ns/op +8.8 ns/op / +5.2% (worse)
Windows MSVC ARM64 ResetActive/Go 30.980 ns/op +0.02 ns/op / +0.1% (worse)
Windows MSVC ARM64 ResetActive/LLGo 116 ns/op +19.53 ns/op / +20.2% (worse)
Windows MSVC ARM64 ResetHeap1024/Go 31.050 ns/op -0.04 ns/op / -0.1% (better)
Windows MSVC ARM64 ResetHeap1024/LLGo 93.780 ns/op +0.34 ns/op / +0.4% (worse)

Compared with 2681caa07abe measured in the same runner job.

@cpunion
cpunion force-pushed the codex/sysv-unaligned-layout-20261029 branch from 965f9d1 to 724423b Compare November 10, 2026 05:56
@cpunion
cpunion marked this pull request as ready for review November 10, 2026 13:15

@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

Reviewed the SysV AMD64 ABI lowering for unaligned/packed aggregates and zero-sized members. This is a well-engineered, focused change: the MEMORY classification of packed/unaligned aggregates is correct, the checkFieldAlignment recursion threads offsets correctly through nested structs and arrays, and the array-stride optimization keeps nested-array classification at O(depth). Test coverage is excellent — unit tests, a benchmark guarding the O(depth) path, and a host interop test that differentially compares the lowered IR (and, on matching hosts, runtime behavior) against real Clang output.

No correctness, security, or documentation-accuracy issues were found. The azure.archive.ubuntu.com CI mirror fallback is benign (an official Canonical mirror; APT trust still rests on the preserved signing keys), and the clang-driven host test uses only test-controlled temp paths with no shell injection surface.

The two inline notes below are minor, non-blocking suggestions.

Minor (no inline anchor):

  • internal/cabi/arch.go — checkFieldAlignment's doc comment says "For an aligned layout, it also returns the maximum member alignment," but on the unaligned path it returns a partial max (struct iteration returns early). It's safe because the only caller (hasUnalignedField) discards the alignment when unaligned is true, but a one-line note that the alignment is only meaningful when the second result is false would prevent future misuse.

Comment thread internal/cabi/arch.go Resolved
Comment thread internal/cabi/arch.go Resolved
@cpunion
cpunion force-pushed the codex/sysv-unaligned-layout-20261029 branch from 724423b to 2959cb0 Compare November 10, 2026 23:21
@cpunion
cpunion force-pushed the codex/sysv-unaligned-layout-20261029 branch from 2959cb0 to 9da449e Compare November 11, 2026 09:20
@cpunion
cpunion merged commit d477126 into xgo-dev:main Nov 11, 2026
369 of 382 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