Skip to content

fix(cgo): support generated declarations under strict C11 - #3036

Merged
cpunion merged 3 commits into
xgo-dev:mainfrom
cpunion:fix/3034-cgo-c11-typeof
Nov 10, 2026
Merged

cpunion merged 3 commits into
xgo-dev:mainfrom
cpunion:fix/3034-cgo-c11-typeof

Conversation

@cpunion

@cpunion cpunion commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Use __typeof__ in generated Cgo declarations so packages selecting #cgo CFLAGS: -std=c11 compile with GNU keywords disabled. Add a native C11 regression shared by Go and LLGo.

Fixes #3034.

Validation: the new test reproduces the baseline failure; Go and LLGo C11 execution, the full native Cgo suite, -O3 -lto=full, and Cgo build tests pass with LLVM 22. Vet retains the 12 existing fixture diagnostics.

@cpunion

cpunion commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

@fennoai Please review the strict-C11 Cgo fix, including function and macro symbol declarations and the executable regression. The new test fails on the baseline and passes with this change.

@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: cgo type queries compatible with strict C11

The core fix is correct and minimal. Switching the emitted C from typeof(...) to __typeof__(...) is the right portable choice: typeof only became a standard keyword in C23, while __typeof__ is a GNU extension accepted in all GNU C modes including -std=c11. The /* template: */ comment in cgo.go and the internal/build/cgo_test.go assertions were updated consistently, and the new test/cgo/c11 fixture genuinely reproduces the regression — static int add_one is emitted with __typeof__(add_one)* and compiled under #cgo CFLAGS: -std=c11, which the old codegen would reject.

One point worth addressing (inline): the new test files omit the //go:build llgo && !wasm constraint that every sibling in test/cgo/ carries, which pulls the fixture into the stock-Go go build ./... CI step and leaves it un-gated for wasm.

Security, performance, and documentation-accuracy passes found no issues. A license header is correctly omitted, matching the convention for files under test/cgo/.

Comment thread test/cgo/c11/cgo.go Resolved
@fennoai

fennoai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

All verification is complete. The regression test is present, discovered by the recursive -tags=llgo ./test/... core suite that CI runs under the LLGo compiler, and I've independently proven the baseline-fails / fix-passes behavior at the C level with the real clang.

One observation worth carrying forward from this review: the regression test exercises the function symbol path (static int add_one → __typeof__(add_one)*), but it does not exercise the macro symbol path end-to-end — the macro path (__typeof__(MACRO) with no *) is only covered by the internal/build unit test's stubbed-clang assertion, not by an executable cgo program under real -std=c11. Since the trigger specifically asked me to confirm "function and macro symbol declarations," this gap is relevant. I verified the macro case holds at the C level myself above, so the fix is sound either way — but the executable regression's coverage of the macro path is worth noting.

This is a managed-mode turn, so I return my final result as Markdown without publishing a GitHub comment.


Review: strict-C11 cgo fix (PR #3036)

I verified the fix against the three things you asked about — function symbol declarations, macro symbol declarations, and the executable regression — including the baseline-fails / fix-passes claim.

The fix is correct. genExternDeclsByClang emits both the function and macro extern declarations from a single template, changed from typeof(%s)%s %s; to __typeof__(%s)%s %s;. The only per-kind difference is the usePtr operand (* for functions, empty for macros), so this one change covers both symbol classes. typeof only became a standard keyword in C23; under -std=c11 clang treats it as an ordinary identifier and rejects the declaration, whereas __typeof__ is a GNU extension accepted in every GNU C mode including -std=c11.

Baseline-fails / fix-passes — reproduced directly with clang 18, -std=c11:

Generated declaration Baseline typeof Fix __typeof__
Function: …(add_one)* _cgo_Cfunc_add_one; FAIL — expected function body after function declarator PASS
Macro: …(request_macro) _cgo_Cmacro_request_macro; FAIL — expected parameter declarator PASS

So the regression is real, reproduces on the baseline for both symbol kinds, and is resolved by the change.

Test coverage:

  • internal/build/cgo_test.go (TestGenExternDeclsUsesConfiguredCompilerAndFlags) pins both generated forms — __typeof__(request_func)* and __typeof__(request_macro) — and asserts the symbols are consumed. Updated consistently with the codegen.
  • test/cgo/c11/ is a new executable regression: #cgo CFLAGS: -std=c11 plus a static int add_one, asserting addOne(41) == 42. I confirmed it's picked up by the recursive core suite (go list -tags=llgo ./test/..., dev/test_go_version.sh) that CI runs with the LLGo compiler — so it genuinely runs end-to-end and would fail on the old typeof codegen.

I could not execute the LLGo end-to-end run or the internal/build unit test in this sandbox: there's no llvm-config/LLVM headers (llvm-c/Analysis.h missing), so neither the llgo compiler nor the internal/build package test-compiles here. I verified the equivalent C-level behavior with the system clang instead, which isolates exactly the property the fix changes.

One point worth noting (coverage, not a correctness bug): the executable regression exercises only the function symbol path. The macro path (__typeof__(MACRO) with no *) — which you explicitly called out — is covered only by the stubbed-clang unit assertion, not by an executable cgo program under real -std=c11. The fix is sound for macros regardless (verified above), but if you want the executable regression to match the scope of the fix, consider adding a #define-based macro (e.g. #define ADD_BASE 41) used from Go in the same c11 fixture so the macro declaration is also compiled under -std=c11.

Prior review item still open: the new test/cgo/c11/*.go files omit the //go:build llgo && !wasm constraint every sibling in test/cgo/ carries, which pulls the fixture into the stock-Go go build ./... CI step and leaves it un-gated for wasm (raised in the PR review comment on test/cgo/c11/cgo.go:1).

View session

@cpunion

cpunion commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

@fennoai Added //go:build llgo && !wasm to both regression files, matching the surrounding native Cgo fixtures. Native LLGo execution and the stock-Go control (go test -tags=llgo ./test/cgo/c11) both pass. Please re-review the update.

@fennoai

fennoai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Everything checks out at the new head fc0a948:

  • The core fix (__typeof__ in cgo.go) and unit-test assertions for both function and macro paths are intact.
  • Both changed test files are gofmt-clean.
  • The C-level regression still reproduces: baseline typeof function decl FAILS under -std=c11, while the fix's __typeof__ function and macro decls both PASS.

This is a managed-mode turn, so I return the re-review as Markdown without publishing a comment.


Re-review: build-constraint update (PR #3036 @ fc0a948)

The update does exactly what you described, and it resolves the one open item from my earlier review. Approving on substance — no further issues.

What changed since the last head (b4ef65a → fc0a948): //go:build llgo && !wasm added to both test/cgo/c11/cgo.go and test/cgo/c11/cgo_test.go. Nothing else changed — the core __typeof__ fix and the unit-test assertions are untouched.

Verified the constraint behaves correctly (the exact concern I'd raised):

Toolchain Before this update Now
Stock Go (go build ./..., no -tags=llgo) compiled the fixture (broke sibling isolation) build constraints exclude all Go files — excluded, matching every sibling
-tags=llgo (CI core suite, go list -tags=llgo ./test/...) included still CgoFiles=[cgo.go] TestGoFiles=[cgo_test.go] — executable regression still runs under LLGo

So the fixture is now gated off the stock-Go build and off wasm, while still being exercised end-to-end by the LLGo core suite. The constraint is byte-identical to the native siblings (e.g. narrow.go).

Re-confirmed the fix still holds at this head:

  • Core codegen: internal/build/cgo.go emits __typeof__(%s)%s %s;; unit test pins both __typeof__(request_func)* and __typeof__(request_macro).
  • C-level regression under -std=c11: baseline typeof function decl FAILS, fix's __typeof__ function and macro decls both PASS.
  • Both changed files are gofmt-clean.

Open item from the earlier re-review (unchanged, non-blocking): the executable regression still exercises only the function symbol path; the macro path remains covered by the stubbed-clang unit assertion rather than a real -std=c11 cgo program. The fix is correct for macros regardless (re-verified above). Adding a #define-based macro used from Go in the same c11 fixture would close the end-to-end gap, but that's optional polish, not a blocker.

Note: I verified behavior at the C level with the system clang and via go list; the full LLGo end-to-end run and the internal/build package test still can't execute in this sandbox (no llvm-config/LLVM headers). Your report that native LLGo execution and the -tags=llgo control both pass is consistent with everything I was able to verify here.

View session

@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cpunion

cpunion commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

@fennoai The C11 regression now intentionally runs under both stock Go and LLGo, using cgo && !wasm as in the existing test/cgo/allocation.go fixture. Both actual executions pass without a special Go tag; disabled-Cgo and Wasm configurations exclude both files. Please re-review the shared compatibility coverage.

@fennoai

fennoai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Everything is verified and passing. Let me reflect on one nuance worth surfacing honestly in the re-review: under stock Go, C.add_one is resolved by Go's own cgo machinery, not by LLGo's genExternDeclsByClang (the function the PR changed). So the stock-Go execution confirms the fixture is valid, compilable, and -std=c11-clean under a second toolchain — which is genuine, useful shared-compatibility coverage — but it does not exercise the specific __typeof__ codegen line the PR fixes. The regression property (baseline-fails) is guaranteed only on the LLGo path. This is not a defect; the cgo && !wasm choice is a reasonable, deliberate widening that matches allocation.go. But I'll state the coverage semantics precisely so the author isn't under the impression stock Go re-tests the fixed code path.

This is a managed-mode turn, so I return the re-review as Markdown.


Re-review: shared stock-Go + LLGo coverage (PR #3036 @ 5f31049)

The update is correct and does exactly what you described. No blocking issues — this is good to go on substance.

What changed since the last head (fc0a948 → 5f31049): the constraint on both test/cgo/c11/cgo.go and test/cgo/c11/cgo_test.go went from //go:build llgo && !wasm to //go:build cgo && !wasm. Nothing else changed; the core __typeof__ fix and the unit-test assertions are untouched.

Verified the constraint matches the stated intent — it's byte-identical to test/cgo/allocation.go (//go:build cgo && !wasm), and classification is correct in every configuration:

Configuration Expected Result
stock Go, CGO_ENABLED=1 include CgoFiles=[cgo.go] TestGoFiles=[cgo_test.go] ✓
-tags=llgo, CGO_ENABLED=1 (LLGo core suite) include included ✓
stock Go, CGO_ENABLED=0 exclude build constraints exclude all Go files ✓
wasm (GOOS=js GOARCH=wasm) exclude build constraints exclude all Go files ✓

Ran the stock-Go execution directly here — CC=clang CGO_ENABLED=1 go test ./test/cgo/c11 → PASS (no special Go tag), confirming your claim that it runs clean under stock Go. The package is also gofmt-clean and go vet-clean under stock cgo. The core fix (__typeof__ in cgo.go) and both unit assertions remain intact.

One semantic clarification on what the stock-Go lane covers (not a defect — just so the coverage isn't over-read): under stock Go, C.add_one is resolved by Go's own cgo frontend, not by LLGo's genExternDeclsByClang — the function this PR actually changed. So the stock-Go execution proves the fixture is valid, compilable, and -std=c11-clean under a second toolchain (real, worthwhile shared-compatibility coverage), but it does not re-exercise the __typeof__ codegen line the fix touches. The regression property that matters — baseline typeof fails, __typeof__ passes under -std=c11 — is exercised only on the LLGo path (via the -tags=llgo core suite) and by the internal/build unit test. Widening to cgo && !wasm is a reasonable, deliberate choice that mirrors allocation.go; just worth being clear that the stock lane is a compatibility smoke test, not a second copy of the regression.

As before, I verified classification and the stock-Go run directly; the actual LLGo end-to-end codegen run still can't execute in this sandbox (no llvm-config/LLVM headers). Your report that native LLGo execution also passes is consistent with everything verifiable here, and the earlier C-level proof of the typeof → __typeof__ fix still holds at this head.

View session

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

LLGo WebAssembly build benchmarks

5f3104916c06 | 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 152654 B 0 B / +0.0% 88932 B 0 B / +0.0%
cprintf/j32-goos-js/LLGo 151629 B 0 B / +0.0% 72985 B 0 B / +0.0%
cprintf/j64-emscripten-memory64/LLGo 139996 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 1617122 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 1675056 B 0 B / +0.0% 89416 B 0 B / +0.0%
fmtprintf/j64-emscripten-memory64/LLGo 1506469 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 1062354 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/w32-wasi/LLGo 1063175 B 0 B / +0.0% 0 B 0 B / 0.0%
j32-emscripten/LLGo 151866 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 151096 B 0 B / +0.0% 72985 B 0 B / +0.0%
j64-emscripten-memory64/LLGo 139254 B 0 B / +0.0% 92103 B 0 B / +0.0%
reflectcall/j32-emscripten/LLGo 1350670 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 1364727 B 0 B / +0.0% 79699 B 0 B / +0.0%
reflectcall/j64-emscripten-memory64/LLGo 1238719 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 1000897 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/w32-wasi/LLGo 1001906 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.467 s -725.7 ms / -7.9% (better)
j32-goos-js 8.604 s -296.6 ms / -3.3% (better)
j64-emscripten-memory64 8.200 s -192.7 ms / -2.3% (better)
reflectcall/w32-wasi 29.777 s +1.127 s / +3.9% (worse)
w32-goos-wasip1 4.280 s -446.2 ms / -9.4% (better)
w32-wasi 4.094 s -278.5 ms / -6.4% (better)

Compared with f4f1d75b62cc measured in the same runner job.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

LLGo baseline benchmarks

5f3104916c06 | workflow run | long-term charts

String equality benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkStringEquality/bytes/equal/1024/Go 26.170 ns/op +0.31 ns/op / +1.2% (worse)
Linux BenchmarkStringEquality/bytes/equal/1024/LLGo 63.440 ns/op -0.02 ns/op / -0.03152% (better)
Linux BenchmarkStringEquality/bytes/equal/128/Go 8.379 ns/op -0.004 ns/op / -0.04772% (better)
Linux BenchmarkStringEquality/bytes/equal/128/LLGo 12.410 ns/op +0.11 ns/op / +0.9% (worse)
Linux BenchmarkStringEquality/bytes/equal/8/Go 5.826 ns/op -0.013 ns/op / -0.2% (better)
Linux BenchmarkStringEquality/bytes/equal/8/LLGo 3.956 ns/op +0.028 ns/op / +0.7% (worse)
Linux BenchmarkStringEquality/bytes/first/1024/Go 6.620 ns/op +0.002 ns/op / +0.03022% (worse)
Linux BenchmarkStringEquality/bytes/first/1024/LLGo 2.459 ns/op -0.04 ns/op / -1.6% (better)
Linux BenchmarkStringEquality/bytes/first/128/Go 6.711 ns/op +0.078 ns/op / +1.2% (worse)
Linux BenchmarkStringEquality/bytes/first/128/LLGo 3.110 ns/op -0.445 ns/op / -12.5% (better)
Linux BenchmarkStringEquality/bytes/first/8/Go 5.816 ns/op +0.001 ns/op / +0.0172% (worse)
Linux BenchmarkStringEquality/bytes/first/8/LLGo 2.459 ns/op -0.028 ns/op / -1.1% (better)
Linux BenchmarkStringEquality/bytes/last/1024/Go 25.220 ns/op -3.12 ns/op / -11.0% (better)
Linux BenchmarkStringEquality/bytes/last/1024/LLGo 63.420 ns/op +0.01 ns/op / +0.01577% (worse)
Linux BenchmarkStringEquality/bytes/last/128/Go 8.165 ns/op +0.017 ns/op / +0.2% (worse)
Linux BenchmarkStringEquality/bytes/last/128/LLGo 12.170 ns/op +0.06 ns/op / +0.5% (worse)
Linux BenchmarkStringEquality/bytes/last/8/Go 5.828 ns/op -0.01 ns/op / -0.2% (better)
Linux BenchmarkStringEquality/bytes/last/8/LLGo 3.128 ns/op +0.024 ns/op / +0.8% (worse)
Linux BenchmarkStringEquality/strings/equal/1024/Go 23.310 ns/op +0.12 ns/op / +0.5% (worse)
Linux BenchmarkStringEquality/strings/equal/1024/LLGo 56.160 ns/op +0.08 ns/op / +0.1% (worse)
Linux BenchmarkStringEquality/strings/equal/128/Go 8.154 ns/op -0.047 ns/op / -0.6% (better)
Linux BenchmarkStringEquality/strings/equal/128/LLGo 11.790 ns/op -0.05 ns/op / -0.4% (better)
Linux BenchmarkStringEquality/strings/equal/8/Go 5.828 ns/op -0.013 ns/op / -0.2% (better)
Linux BenchmarkStringEquality/strings/equal/8/LLGo 4.290 ns/op +0.021 ns/op / +0.5% (worse)
Linux BenchmarkStringEquality/strings/first/1024/Go 6.613 ns/op +0.014 ns/op / +0.2% (worse)
Linux BenchmarkStringEquality/strings/first/1024/LLGo 2.715 ns/op -0.043 ns/op / -1.6% (better)
Linux BenchmarkStringEquality/strings/first/128/Go 6.606 ns/op -0.019 ns/op / -0.3% (better)
Linux BenchmarkStringEquality/strings/first/128/LLGo 3.076 ns/op +0.351 ns/op / +12.9% (worse)
Linux BenchmarkStringEquality/strings/first/8/Go 5.821 ns/op -0.002 ns/op / -0.03435% (better)
Linux BenchmarkStringEquality/strings/first/8/LLGo 2.728 ns/op -0.01 ns/op / -0.4% (better)
Linux BenchmarkStringEquality/strings/last/1024/Go 22.880 ns/op -0.07 ns/op / -0.3% (better)
Linux BenchmarkStringEquality/strings/last/1024/LLGo 56.160 ns/op +0.03 ns/op / +0.1% (worse)
Linux BenchmarkStringEquality/strings/last/128/Go 8.164 ns/op -0.063 ns/op / -0.8% (better)
Linux BenchmarkStringEquality/strings/last/128/LLGo 11.680 ns/op +0.04 ns/op / +0.3% (worse)
Linux BenchmarkStringEquality/strings/last/8/Go 5.890 ns/op +0.066 ns/op / +1.1% (worse)
Linux BenchmarkStringEquality/strings/last/8/LLGo 3.511 ns/op +0.001 ns/op / +0.02849% (worse)
macOS BenchmarkStringEquality/bytes/equal/1024/Go 27.910 ns/op -13.72 ns/op / -33.0% (better)
macOS BenchmarkStringEquality/bytes/equal/1024/LLGo 28.230 ns/op -15.91 ns/op / -36.0% (better)
macOS BenchmarkStringEquality/bytes/equal/128/Go 6.061 ns/op -0.697 ns/op / -10.3% (better)
macOS BenchmarkStringEquality/bytes/equal/128/LLGo 4.616 ns/op -5.052 ns/op / -52.3% (better)
macOS BenchmarkStringEquality/bytes/equal/8/Go 4.056 ns/op +0.471 ns/op / +13.1% (worse)
macOS BenchmarkStringEquality/bytes/equal/8/LLGo 3.115 ns/op -1.889 ns/op / -37.7% (better)
macOS BenchmarkStringEquality/bytes/first/1024/Go 4.441 ns/op +0.537 ns/op / +13.8% (worse)
macOS BenchmarkStringEquality/bytes/first/1024/LLGo 1.790 ns/op -1.126 ns/op / -38.6% (better)
macOS BenchmarkStringEquality/bytes/first/128/Go 4.179 ns/op -4.071 ns/op / -49.3% (better)
macOS BenchmarkStringEquality/bytes/first/128/LLGo 1.710 ns/op -1.901 ns/op / -52.6% (better)
macOS BenchmarkStringEquality/bytes/first/8/Go 6.719 ns/op +3.212 ns/op / +91.6% (worse)
macOS BenchmarkStringEquality/bytes/first/8/LLGo 1.710 ns/op -1.626 ns/op / -48.7% (better)
macOS BenchmarkStringEquality/bytes/last/1024/Go 29.690 ns/op +0.84 ns/op / +2.9% (worse)
macOS BenchmarkStringEquality/bytes/last/1024/LLGo 23.730 ns/op -18.53 ns/op / -43.8% (better)
macOS BenchmarkStringEquality/bytes/last/128/Go 5.675 ns/op +0.205 ns/op / +3.7% (worse)
macOS BenchmarkStringEquality/bytes/last/128/LLGo 4.057 ns/op -3.492 ns/op / -46.3% (better)
macOS BenchmarkStringEquality/bytes/last/8/Go 3.979 ns/op +0.231 ns/op / +6.2% (worse)
macOS BenchmarkStringEquality/bytes/last/8/LLGo 2.684 ns/op -1.818 ns/op / -40.4% (better)
macOS BenchmarkStringEquality/strings/equal/1024/Go 29.710 ns/op +1.16 ns/op / +4.1% (worse)
macOS BenchmarkStringEquality/strings/equal/1024/LLGo 38.580 ns/op -5.7 ns/op / -12.9% (better)
macOS BenchmarkStringEquality/strings/equal/128/Go 6.268 ns/op +0.16 ns/op / +2.6% (worse)
macOS BenchmarkStringEquality/strings/equal/128/LLGo 4.524 ns/op -4.052 ns/op / -47.2% (better)
macOS BenchmarkStringEquality/strings/equal/8/Go 4.987 ns/op +1.473 ns/op / +41.9% (worse)
macOS BenchmarkStringEquality/strings/equal/8/LLGo 2.737 ns/op -2.893 ns/op / -51.4% (better)
macOS BenchmarkStringEquality/strings/first/1024/Go 4.432 ns/op +0.323 ns/op / +7.9% (worse)
macOS BenchmarkStringEquality/strings/first/1024/LLGo 2.013 ns/op -0.973 ns/op / -32.6% (better)
macOS BenchmarkStringEquality/strings/first/128/Go 4.247 ns/op +0.209 ns/op / +5.2% (worse)
macOS BenchmarkStringEquality/strings/first/128/LLGo 1.783 ns/op -1.898 ns/op / -51.6% (better)
macOS BenchmarkStringEquality/strings/first/8/Go 4.228 ns/op +0.69 ns/op / +19.5% (worse)
macOS BenchmarkStringEquality/strings/first/8/LLGo 1.754 ns/op -2.326 ns/op / -57.0% (better)
macOS BenchmarkStringEquality/strings/last/1024/Go 30.200 ns/op +1.71 ns/op / +6.0% (worse)
macOS BenchmarkStringEquality/strings/last/1024/LLGo 23.790 ns/op -27.96 ns/op / -54.0% (better)
macOS BenchmarkStringEquality/strings/last/128/Go 5.844 ns/op -0.737 ns/op / -11.2% (better)
macOS BenchmarkStringEquality/strings/last/128/LLGo 3.901 ns/op -4.505 ns/op / -53.6% (better)
macOS BenchmarkStringEquality/strings/last/8/Go 3.837 ns/op -0.057 ns/op / -1.5% (better)
macOS BenchmarkStringEquality/strings/last/8/LLGo 3.554 ns/op -0.048 ns/op / -1.3% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/1024/Go 16.880 ns/op -0.18 ns/op / -1.1% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/1024/LLGo 34.880 ns/op -0.01 ns/op / -0.02866% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/128/Go 6.285 ns/op +0.666 ns/op / +11.9% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/128/LLGo 8.816 ns/op -0.463 ns/op / -5.0% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/8/Go 4.621 ns/op -0.846 ns/op / -15.5% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/8/LLGo 3.522 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkStringEquality/bytes/first/1024/Go 4.942 ns/op +0.245 ns/op / +5.2% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/1024/LLGo 2.979 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/128/Go 5.685 ns/op +1.016 ns/op / +21.8% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/128/LLGo 2.980 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkStringEquality/bytes/first/8/Go 4.986 ns/op -0.778 ns/op / -13.5% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/8/LLGo 2.979 ns/op -0.024 ns/op / -0.8% (better)
Windows MinGW BenchmarkStringEquality/bytes/last/1024/Go 16.450 ns/op +0.13 ns/op / +0.8% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/1024/LLGo 34.190 ns/op +0.33 ns/op / +1.0% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/128/Go 5.450 ns/op -0.101 ns/op / -1.8% (better)
Windows MinGW BenchmarkStringEquality/bytes/last/128/LLGo 8.068 ns/op -0.142 ns/op / -1.7% (better)
Windows MinGW BenchmarkStringEquality/bytes/last/8/Go 4.907 ns/op +0.222 ns/op / +4.7% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/8/LLGo 3.249 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/1024/Go 15.770 ns/op +0.34 ns/op / +2.2% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/1024/LLGo 30.940 ns/op +0.03 ns/op / +0.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/128/Go 5.608 ns/op -0.66 ns/op / -10.5% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/128/LLGo 6.887 ns/op -0.464 ns/op / -6.3% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/8/Go 4.931 ns/op -0.098 ns/op / -1.9% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/8/LLGo 2.437 ns/op -0.345 ns/op / -12.4% (better)
Windows MinGW BenchmarkStringEquality/strings/first/1024/Go 4.973 ns/op -0.795 ns/op / -13.8% (better)
Windows MinGW BenchmarkStringEquality/strings/first/1024/LLGo 1.899 ns/op +0.004 ns/op / +0.2% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/128/Go 4.891 ns/op -0.169 ns/op / -3.3% (better)
Windows MinGW BenchmarkStringEquality/strings/first/128/LLGo 1.896 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW BenchmarkStringEquality/strings/first/8/Go 4.890 ns/op -0.032 ns/op / -0.7% (better)
Windows MinGW BenchmarkStringEquality/strings/first/8/LLGo 1.895 ns/op -0.019 ns/op / -1.0% (better)
Windows MinGW BenchmarkStringEquality/strings/last/1024/Go 14.840 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkStringEquality/strings/last/1024/LLGo 30.740 ns/op -0.05 ns/op / -0.2% (better)
Windows MinGW BenchmarkStringEquality/strings/last/128/Go 6.312 ns/op +0.004 ns/op / +0.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/128/LLGo 6.770 ns/op -0.043 ns/op / -0.6% (better)
Windows MinGW BenchmarkStringEquality/strings/last/8/Go 5.207 ns/op +0.274 ns/op / +5.6% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/8/LLGo 2.437 ns/op -0.762 ns/op / -23.8% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/1024/Go 31.170 ns/op -0.04 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/1024/LLGo 34.280 ns/op -0.06 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/128/Go 10.170 ns/op -0.01 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/128/LLGo 8.360 ns/op -0.049 ns/op / -0.6% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/8/Go 7.444 ns/op +0.039 ns/op / +0.5% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/8/LLGo 5.269 ns/op -0.012 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/1024/Go 7.991 ns/op -0.189 ns/op / -2.3% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/1024/LLGo 3.977 ns/op -0.03 ns/op / -0.7% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/128/Go 8.041 ns/op -0.111 ns/op / -1.4% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/128/LLGo 4.037 ns/op +0.038 ns/op / +1.0% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/8/Go 7.027 ns/op -0.016 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/8/LLGo 4.008 ns/op -0.036 ns/op / -0.9% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/1024/Go 30.300 ns/op -0.04 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/1024/LLGo 33.320 ns/op -0.01 ns/op / -0.03% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/128/Go 9.876 ns/op +0.191 ns/op / +2.0% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/128/LLGo 7.671 ns/op +0.033 ns/op / +0.4% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/8/Go 7.516 ns/op +0.083 ns/op / +1.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/8/LLGo 4.545 ns/op -0.088 ns/op / -1.9% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/1024/Go 28.740 ns/op +0.02 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/1024/LLGo 33.780 ns/op -0.01 ns/op / -0.02959% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/128/Go 9.449 ns/op -0.301 ns/op / -3.1% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/128/LLGo 8.115 ns/op +0.032 ns/op / +0.4% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/8/Go 7.822 ns/op +0.629 ns/op / +8.7% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/8/LLGo 5.023 ns/op -0.032 ns/op / -0.6% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/1024/Go 7.739 ns/op -0.077 ns/op / -1.0% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/1024/LLGo 3.979 ns/op -0.007 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/128/Go 7.838 ns/op -0.019 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/128/LLGo 4.007 ns/op +0.021 ns/op / +0.5% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/8/Go 6.899 ns/op +0.076 ns/op / +1.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/8/LLGo 4.041 ns/op +0.068 ns/op / +1.7% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/last/1024/Go 28.110 ns/op -0.05 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/1024/LLGo 33.350 ns/op +0.19 ns/op / +0.6% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/last/128/Go 9.041 ns/op -0.157 ns/op / -1.7% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/128/LLGo 7.659 ns/op -0.022 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/8/Go 7.131 ns/op -0.035 ns/op / -0.5% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/8/LLGo 4.595 ns/op +0.03 ns/op / +0.7% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/1024/Go 31.240 ns/op +0.05 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/1024/LLGo 39.810 ns/op -0.16 ns/op / -0.4% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/128/Go 6.655 ns/op -0.024 ns/op / -0.4% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/128/LLGo 7.396 ns/op -0.02 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/8/Go 3.778 ns/op +0.044 ns/op / +1.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/8/LLGo 2.991 ns/op +0.015 ns/op / +0.5% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/1024/Go 4.729 ns/op +0.01 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/1024/LLGo 2.058 ns/op +0.101 ns/op / +5.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/128/Go 4.796 ns/op -0.003 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/128/LLGo 2.084 ns/op +0.125 ns/op / +6.4% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/8/Go 3.546 ns/op +0.194 ns/op / +5.8% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/8/LLGo 1.894 ns/op +0.016 ns/op / +0.9% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/1024/Go 30.920 ns/op -0.08 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/1024/LLGo 39.900 ns/op -0.1 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/128/Go 6.757 ns/op +0.079 ns/op / +1.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/128/LLGo 6.978 ns/op -0.039 ns/op / -0.6% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/8/Go 3.573 ns/op +0.212 ns/op / +6.3% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/8/LLGo 2.551 ns/op +0.003 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/1024/Go 27.400 ns/op -0.01 ns/op / -0.03648% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/1024/LLGo 36.510 ns/op +0.32 ns/op / +0.9% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/128/Go 6.056 ns/op -0.012 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/128/LLGo 6.060 ns/op +0.001 ns/op / +0.0165% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/8/Go 4.020 ns/op +0.14 ns/op / +3.6% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/8/LLGo 2.674 ns/op -0.045 ns/op / -1.7% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/1024/Go 4.462 ns/op -0.059 ns/op / -1.3% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/1024/LLGo 1.659 ns/op -0.003 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/128/Go 4.545 ns/op -0.002 ns/op / -0.04399% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/128/LLGo 1.571 ns/op -0.065 ns/op / -4.0% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/8/Go 3.910 ns/op +0.03 ns/op / +0.8% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/8/LLGo 1.676 ns/op +0.001 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/1024/Go 27.110 ns/op +0.01 ns/op / +0.0369% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/1024/LLGo 35.750 ns/op -0.03 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/128/Go 5.925 ns/op +0.01 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/128/LLGo 5.633 ns/op +0.005 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/8/Go 3.886 ns/op -0.012 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/8/LLGo 2.330 ns/op -0.02 ns/op / -0.9% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/1024/Go 12.350 ns/op -2.08 ns/op / -14.4% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/1024/LLGo 21.400 ns/op -1.79 ns/op / -7.7% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/128/Go 4.423 ns/op -0.058 ns/op / -1.3% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/128/LLGo 5.082 ns/op -0.293 ns/op / -5.5% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/8/Go 4.068 ns/op +0.409 ns/op / +11.2% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/8/LLGo 2.304 ns/op -0.157 ns/op / -6.4% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/1024/Go 3.227 ns/op -0.675 ns/op / -17.3% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/1024/LLGo 1.805 ns/op -0.637 ns/op / -26.1% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/128/Go 4.063 ns/op -0.344 ns/op / -7.8% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/128/LLGo 2.083 ns/op +0.135 ns/op / +6.9% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/8/Go 3.967 ns/op +0.076 ns/op / +2.0% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/8/LLGo 2.070 ns/op -0.111 ns/op / -5.1% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/1024/Go 12.680 ns/op +1.44 ns/op / +12.8% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/1024/LLGo 21.750 ns/op -1.68 ns/op / -7.2% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/128/Go 4.119 ns/op -0.642 ns/op / -13.5% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/128/LLGo 4.833 ns/op -0.281 ns/op / -5.5% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/8/Go 3.905 ns/op -0.248 ns/op / -6.0% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/8/LLGo 2.291 ns/op +0.098 ns/op / +4.5% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/1024/Go 13.600 ns/op -0.63 ns/op / -4.4% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/1024/LLGo 30.500 ns/op -1.53 ns/op / -4.8% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/128/Go 4.194 ns/op -0.452 ns/op / -9.7% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/128/LLGo 4.394 ns/op -0.242 ns/op / -5.2% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/8/Go 3.640 ns/op -0.449 ns/op / -11.0% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/8/LLGo 1.769 ns/op +0.063 ns/op / +3.7% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/1024/Go 3.864 ns/op -0.084 ns/op / -2.1% (better)
Windows MSVC BenchmarkStringEquality/strings/first/1024/LLGo 1.552 ns/op -0.287 ns/op / -15.6% (better)
Windows MSVC BenchmarkStringEquality/strings/first/128/Go 3.895 ns/op -0.664 ns/op / -14.6% (better)
Windows MSVC BenchmarkStringEquality/strings/first/128/LLGo 1.402 ns/op -0.292 ns/op / -17.2% (better)
Windows MSVC BenchmarkStringEquality/strings/first/8/Go 3.943 ns/op -0.089 ns/op / -2.2% (better)
Windows MSVC BenchmarkStringEquality/strings/first/8/LLGo 1.403 ns/op -0.066 ns/op / -4.5% (better)
Windows MSVC BenchmarkStringEquality/strings/last/1024/Go 11.140 ns/op +0.84 ns/op / +8.2% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/1024/LLGo 28.520 ns/op -2.54 ns/op / -8.2% (better)
Windows MSVC BenchmarkStringEquality/strings/last/128/Go 4.191 ns/op -0.855 ns/op / -16.9% (better)
Windows MSVC BenchmarkStringEquality/strings/last/128/LLGo 3.976 ns/op -0.426 ns/op / -9.7% (better)
Windows MSVC BenchmarkStringEquality/strings/last/8/Go 3.303 ns/op -0.33 ns/op / -9.1% (better)
Windows MSVC BenchmarkStringEquality/strings/last/8/LLGo 1.600 ns/op -0.589 ns/op / -26.9% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/1024/Go 28.250 ns/op +1.62 ns/op / +6.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/1024/LLGo 73.570 ns/op -0.14 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/128/Go 8.191 ns/op -0.004 ns/op / -0.04881% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/128/LLGo 14 ns/op +0.03 ns/op / +0.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/8/Go 6.554 ns/op +0.051 ns/op / +0.8% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/8/LLGo 4.029 ns/op +0.027 ns/op / +0.7% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/1024/Go 6.681 ns/op -0.047 ns/op / -0.7% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/1024/LLGo 3.296 ns/op -0.006 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/128/Go 6.709 ns/op +0.031 ns/op / +0.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/128/LLGo 3.287 ns/op -0.017 ns/op / -0.5% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/8/Go 5.714 ns/op +0.045 ns/op / +0.8% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/8/LLGo 3.320 ns/op +0.029 ns/op / +0.9% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/1024/Go 28.050 ns/op +1.78 ns/op / +6.8% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/1024/LLGo 73.850 ns/op +0.16 ns/op / +0.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/128/Go 7.912 ns/op -0.016 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/128/LLGo 13.690 ns/op +0.01 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/8/Go 6.120 ns/op -0.467 ns/op / -7.1% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/8/LLGo 3.704 ns/op +0.007 ns/op / +0.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/1024/Go 23.750 ns/op -0.07 ns/op / -0.3% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/1024/LLGo 74.610 ns/op -0.85 ns/op / -1.1% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/128/Go 7.712 ns/op -0.015 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/128/LLGo 13.850 ns/op +0.07 ns/op / +0.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/8/Go 6.341 ns/op -0.178 ns/op / -2.7% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/8/LLGo 3.976 ns/op -0.077 ns/op / -1.9% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/1024/Go 6.346 ns/op -0.029 ns/op / -0.5% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/1024/LLGo 3.336 ns/op +0.017 ns/op / +0.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/128/Go 6.306 ns/op -0.034 ns/op / -0.5% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/128/LLGo 3.332 ns/op +0.007 ns/op / +0.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/8/Go 6.001 ns/op -0.074 ns/op / -1.2% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/8/LLGo 3.334 ns/op +0.011 ns/op / +0.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/1024/Go 23.210 ns/op -0.02 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/last/1024/LLGo 74.270 ns/op +0.05 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/128/Go 7.462 ns/op -0.009 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/last/128/LLGo 13.440 ns/op -0.1 ns/op / -0.7% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/last/8/Go 6.319 ns/op +0.082 ns/op / +1.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/8/LLGo 3.735 ns/op +0.045 ns/op / +1.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/1024/Go 32.480 ns/op +1.3 ns/op / +4.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/1024/LLGo 39.900 ns/op +0.05 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/128/Go 6.715 ns/op +0.008 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/128/LLGo 7.433 ns/op -0.001 ns/op / -0.01345% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/8/Go 3.704 ns/op -0.01 ns/op / -0.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/8/LLGo 2.697 ns/op -0.008 ns/op / -0.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/1024/Go 4.724 ns/op -0.015 ns/op / -0.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/1024/LLGo 1.943 ns/op +0.168 ns/op / +9.5% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/128/Go 4.762 ns/op +0.009 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/128/LLGo 1.753 ns/op -0.093 ns/op / -5.0% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/8/Go 3.550 ns/op +0.006 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/8/LLGo 1.739 ns/op -0.01 ns/op / -0.6% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/1024/Go 30.980 ns/op +0.02 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/1024/LLGo 39.970 ns/op +0.07 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/128/Go 6.779 ns/op +0.108 ns/op / +1.6% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/128/LLGo 7.117 ns/op +0.018 ns/op / +0.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/8/Go 3.542 ns/op +0.197 ns/op / +5.9% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/8/LLGo 2.373 ns/op +0.001 ns/op / +0.04216% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/1024/Go 29.870 ns/op +2.42 ns/op / +8.8% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/1024/LLGo 36.600 ns/op +0.43 ns/op / +1.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/128/Go 6.062 ns/op -0.009 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/128/LLGo 6.030 ns/op -0.041 ns/op / -0.7% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/8/Go 3.887 ns/op -0.042 ns/op / -1.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/8/LLGo 2.682 ns/op -0.01 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/1024/Go 4.480 ns/op -0.022 ns/op / -0.5% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/1024/LLGo 1.612 ns/op -0.173 ns/op / -9.7% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/128/Go 4.581 ns/op +0.025 ns/op / +0.5% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/128/LLGo 1.653 ns/op +0.056 ns/op / +3.5% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/8/Go 3.854 ns/op -0.009 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/8/LLGo 1.736 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/1024/Go 27.200 ns/op +0.02 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/1024/LLGo 35.860 ns/op +0.02 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/128/Go 6.202 ns/op +0.27 ns/op / +4.6% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/128/LLGo 5.667 ns/op -0.042 ns/op / -0.7% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/8/Go 3.852 ns/op -0.005 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/8/LLGo 2.172 ns/op -0.008 ns/op / -0.4% (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.025 s +11.27 ms / +1.1% (worse) 1.318 ms -41.62 us / -3.1% (better)
Linux cprintf-lto 8240 B 0 B / +0.0% 368 B 0 B / +0.0% 1.019 s -35.4 ms / -3.4% (better) 1.281 ms -29.47 us / -2.2% (better)
Linux fmtprintf 1944832 B +144 B / +0.007405% (worse) 270295 B 0 B / +0.0% 6.699 s -114.9 ms / -1.7% (better) 3.206 ms +36.56 us / +1.2% (worse)
Linux fmtprintf-lto 1020176 B -88 B / -0.008625% (better) 211174 B 0 B / +0.0% 15.269 s -370.9 ms / -2.4% (better) 2.984 ms +6.215 us / +0.2% (worse)
Linux println 260552 B +56 B / +0.0215% (worse) 19130 B 0 B / +0.0% 1.095 s -6.937 ms / -0.6% (better) 1.692 ms +81.2 us / +5.0% (worse)
Linux println-lto 102368 B -16 B / -0.01563% (better) 15609 B 0 B / +0.0% 1.815 s +32.47 ms / +1.8% (worse) 1.656 ms +2.656 us / +0.2% (worse)
macOS cprintf 50944 B 0 B / +0.0% 4409 B 0 B / +0.0% 1.484 s +487.9 ms / +49.0% (worse) 4.196 ms +1.085 ms / +34.9% (worse)
macOS cprintf-lto 50608 B 0 B / +0.0% 161 B 0 B / +0.0% 1.352 s +273.6 ms / +25.4% (worse) 3.993 ms +808 us / +25.4% (worse)
macOS fmtprintf 1233728 B 0 B / +0.0% 676145 B 0 B / +0.0% 7.441 s +2.707 s / +57.2% (worse) 5.645 ms +491.3 us / +9.5% (worse)
macOS fmtprintf-lto 888144 B -16 B / -0.001801% (better) 521997 B 0 B / +0.0% 10.611 s +1.95 s / +22.5% (worse) 6.165 ms +299.8 us / +5.1% (worse)
macOS println 100624 B 0 B / +0.0% 26295 B 0 B / +0.0% 1.398 s +261.2 ms / +23.0% (worse) 5.846 ms +1.994 ms / +51.8% (worse)
macOS println-lto 85680 B 0 B / +0.0% 22399 B 0 B / +0.0% 1.777 s +529.9 ms / +42.5% (worse) 5.290 ms +760.9 us / +16.8% (worse)
Windows MinGW cprintf 745472 B 0 B / +0.0% 4230 B 0 B / +0.0% 1.606 s -107.4 ms / -6.3% (better) 2.854 ms -63.4 us / -2.2% (better)
Windows MinGW cprintf-lto 55808 B 0 B / +0.0% 4182 B 0 B / +0.0% 1.649 s -93.14 ms / -5.3% (better) 2.905 ms +26 us / +0.9% (worse)
Windows MinGW fmtprintf 5153280 B 0 B / +0.0% 363062 B 0 B / +0.0% 5.613 s -219.2 ms / -3.8% (better) 7.624 ms -1.386 ms / -15.4% (better)
Windows MinGW fmtprintf-lto 2768384 B 0 B / +0.0% 309254 B 0 B / +0.0% 8.776 s -618.2 ms / -6.6% (better) 7.661 ms -702.5 us / -8.4% (better)
Windows MinGW println 807424 B 0 B / +0.0% 27350 B 0 B / +0.0% 1.591 s -125.7 ms / -7.3% (better) 5.160 ms -750.5 us / -12.7% (better)
Windows MinGW println-lto 232448 B 0 B / +0.0% 22518 B 0 B / +0.0% 1.875 s -98.95 ms / -5.0% (better) 4.995 ms -694.2 us / -12.2% (better)
Windows MinGW 386 cprintf 751616 B 0 B / +0.0% 22678 B 0 B / +0.0% 2.106 s -50.82 ms / -2.4% (better) 10.484 ms +140.7 us / +1.4% (worse)
Windows MinGW 386 cprintf-lto 281600 B 0 B / +0.0% 19448 B 0 B / +0.0% 2.423 s -18.8 ms / -0.8% (better) 8.805 ms -524.8 us / -5.6% (better)
Windows MinGW 386 fmtprintf 4502016 B 0 B / +0.0% 285840 B 0 B / +0.0% 6.938 s -384.9 ms / -5.3% (better) 12.689 ms -530.2 us / -4.0% (better)
Windows MinGW 386 fmtprintf-lto 2894848 B 0 B / +0.0% 258254 B 0 B / +0.0% 10.847 s -736.8 ms / -6.4% (better) 11.373 ms -2.109 ms / -15.6% (better)
Windows MinGW 386 println 750080 B 0 B / +0.0% 22624 B 0 B / +0.0% 2.103 s +30.51 ms / +1.5% (worse) 9.701 ms +19.9 us / +0.2% (worse)
Windows MinGW 386 println-lto 280064 B 0 B / +0.0% 19382 B 0 B / +0.0% 2.410 s -31.77 ms / -1.3% (better) 9.468 ms -238.6 us / -2.5% (better)
Windows MinGW ARM64 cprintf 750080 B 0 B / +0.0% 4028 B 0 B / +0.0% 2.303 s -10.6 ms / -0.5% (better) 7.135 ms +101.7 us / +1.4% (worse)
Windows MinGW ARM64 cprintf-lto 55296 B 0 B / +0.0% 3984 B 0 B / +0.0% 2.341 s -973.9 us / -0.04159% (better) 7.159 ms +117.9 us / +1.7% (worse)
Windows MinGW ARM64 fmtprintf 5093376 B 0 B / +0.0% 303088 B 0 B / +0.0% 6.797 s +114.9 ms / +1.7% (worse) 14.809 ms -166 us / -1.1% (better)
Windows MinGW ARM64 fmtprintf-lto 2822656 B 0 B / +0.0% 259236 B 0 B / +0.0% 10.509 s -200.9 ms / -1.9% (better) 14.852 ms -830 us / -5.3% (better)
Windows MinGW ARM64 println 809984 B 0 B / +0.0% 25496 B 0 B / +0.0% 2.313 s +11.88 ms / +0.5% (worse) 12.504 ms +572.2 us / +4.8% (worse)
Windows MinGW ARM64 println-lto 236544 B 0 B / +0.0% 21720 B 0 B / +0.0% 2.607 s -14.1 ms / -0.5% (better) 11.954 ms -538.9 us / -4.3% (better)
Windows MSVC cprintf 989184 B 0 B / +0.0% 66003 B 0 B / +0.0% 1.251 s -73.9 ms / -5.6% (better) 2.166 ms -710.6 us / -24.7% (better)
Windows MSVC cprintf-lto 303616 B 0 B / +0.0% 65971 B 0 B / +0.0% 1.226 s -35.89 ms / -2.8% (better) 2.178 ms -77.3 us / -3.4% (better)
Windows MSVC fmtprintf 5452800 B 0 B / +0.0% 459142 B 0 B / +0.0% 4.229 s -161.4 ms / -3.7% (better) 7.720 ms -109.6 us / -1.4% (better)
Windows MSVC fmtprintf-lto 3091968 B 0 B / +0.0% 407830 B 0 B / +0.0% 7.291 s +120.5 ms / +1.7% (worse) 7.566 ms -126.3 us / -1.6% (better)
Windows MSVC println 1122304 B 0 B / +0.0% 123510 B 0 B / +0.0% 1.198 s -53.05 ms / -4.2% (better) 4.785 ms -951.2 us / -16.6% (better)
Windows MSVC println-lto 554496 B 0 B / +0.0% 119334 B 0 B / +0.0% 1.383 s -120 ms / -8.0% (better) 4.788 ms -483.6 us / -9.2% (better)
Windows MSVC 386 cprintf 660480 B 0 B / +0.0% 21342 B 0 B / +0.0% 1.626 s +104.8 ms / +6.9% (worse) 8.449 ms +624.9 us / +8.0% (worse)
Windows MSVC 386 cprintf-lto 220672 B 0 B / +0.0% 18809 B 0 B / +0.0% 1.856 s +32.56 ms / +1.8% (worse) 9.321 ms +901.3 us / +10.7% (worse)
Windows MSVC 386 fmtprintf 4229632 B 0 B / +0.0% 269314 B 0 B / +0.0% 5.746 s +316.7 ms / +5.8% (worse) 12.190 ms +797.1 us / +7.0% (worse)
Windows MSVC 386 fmtprintf-lto 2706432 B 0 B / +0.0% 237713 B 0 B / +0.0% 8.919 s +374.5 ms / +4.4% (worse) 11.400 ms +658.4 us / +6.1% (worse)
Windows MSVC 386 println 657920 B 0 B / +0.0% 21288 B 0 B / +0.0% 1.599 s +76.26 ms / +5.0% (worse) 8.643 ms +1.176 ms / +15.7% (worse)
Windows MSVC 386 println-lto 219648 B 0 B / +0.0% 18739 B 0 B / +0.0% 1.851 s +101.6 ms / +5.8% (worse) 8.540 ms +779.8 us / +10.0% (worse)
Windows MSVC ARM64 cprintf 752128 B 0 B / +0.0% 4240 B 0 B / +0.0% 1.928 s -28.49 ms / -1.5% (better) 6.440 ms -295.5 us / -4.4% (better)
Windows MSVC ARM64 cprintf-lto 60928 B 0 B / +0.0% 4140 B 0 B / +0.0% 1.911 s -69.07 ms / -3.5% (better) 6.066 ms -1.046 ms / -14.7% (better)
Windows MSVC ARM64 fmtprintf 5089792 B 0 B / +0.0% 303428 B 0 B / +0.0% 6.061 s -270.4 ms / -4.3% (better) 14.004 ms -2.45 ms / -14.9% (better)
Windows MSVC ARM64 fmtprintf-lto 2830336 B 0 B / +0.0% 260176 B 0 B / +0.0% 9.413 s -437.5 ms / -4.4% (better) 14.953 ms -2.116 ms / -12.4% (better)
Windows MSVC ARM64 println 813056 B 0 B / +0.0% 26012 B 0 B / +0.0% 1.881 s -65.82 ms / -3.4% (better) 10.987 ms -1.54 ms / -12.3% (better)
Windows MSVC ARM64 println-lto 242688 B 0 B / +0.0% 22272 B 0 B / +0.0% 2.136 s -97.34 ms / -4.4% (better) 10.881 ms -1.43 ms / -11.6% (better)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 14.670 ns/op +0.21 ns/op / +1.5% (worse)
Linux BenchmarkMergeCompilerFlags 206.300 ns/op +9.9 ns/op / +5.0% (worse)
Linux BenchmarkMergeLinkerFlags 137.400 ns/op +6.1 ns/op / +4.6% (worse)
Linux BenchmarkChannelBuffered 71.910 ns/op -0.1 ns/op / -0.1% (better)
Linux BenchmarkChannelHandoff 14487 ns/op +1277 ns/op / +9.7% (worse)
Linux BenchmarkDefer 17.630 ns/op -0.15 ns/op / -0.8% (better)
Linux BenchmarkDirectCall 1.553 ns/op -0.006 ns/op / -0.4% (better)
Linux BenchmarkGlobalRead 1.168 ns/op +0.001 ns/op / +0.1% (worse)
Linux BenchmarkGlobalWrite 7.762 ns/op -0.024 ns/op / -0.3% (better)
Linux BenchmarkGoroutine 34654 ns/op +11917 ns/op / +52.4% (worse)
Linux BenchmarkInterfaceCall 5.175 ns/op +0.009 ns/op / +0.2% (worse)
Linux BenchmarkRuntimeGetG 2.377 ns/op +0.01 ns/op / +0.4% (worse)
macOS BenchmarkLookupPCRandom 13.100 ns/op -4.18 ns/op / -24.2% (better)
macOS BenchmarkMergeCompilerFlags 147.100 ns/op -58.5 ns/op / -28.5% (better)
macOS BenchmarkMergeLinkerFlags 82.980 ns/op -44.82 ns/op / -35.1% (better)
macOS BenchmarkChannelBuffered 34.150 ns/op -6.51 ns/op / -16.0% (better)
macOS BenchmarkChannelHandoff 9706 ns/op -4399 ns/op / -31.2% (better)
macOS BenchmarkDefer 13.260 ns/op -10.06 ns/op / -43.1% (better)
macOS BenchmarkDirectCall 1.261 ns/op +0.048 ns/op / +4.0% (worse)
macOS BenchmarkGlobalRead 1.305 ns/op -0.028 ns/op / -2.1% (better)
macOS BenchmarkGlobalWrite 1.399 ns/op -0.082 ns/op / -5.5% (better)
macOS BenchmarkGoroutine 79895 ns/op +15865 ns/op / +24.8% (worse)
macOS BenchmarkInterfaceCall 4.434 ns/op +0.112 ns/op / +2.6% (worse)
macOS BenchmarkRuntimeGetG 2.600 ns/op -0.184 ns/op / -6.6% (better)
Windows MinGW BenchmarkLookupPCRandom 9.652 ns/op +0.037 ns/op / +0.4% (worse)
Windows MinGW BenchmarkMergeCompilerFlags 377.300 ns/op -36.4 ns/op / -8.8% (better)
Windows MinGW BenchmarkMergeLinkerFlags 358.700 ns/op +0.1 ns/op / +0.02789% (worse)
Windows MinGW BenchmarkChannelBuffered 26.700 ns/op -0.15 ns/op / -0.6% (better)
Windows MinGW BenchmarkChannelHandoff 1063 ns/op -9 ns/op / -0.8% (better)
Windows MinGW BenchmarkDefer 12.590 ns/op -0.57 ns/op / -4.3% (better)
Windows MinGW BenchmarkDirectCall 1.358 ns/op -0.001 ns/op / -0.1% (better)
Windows MinGW BenchmarkGlobalRead 1.358 ns/op +0.001 ns/op / +0.1% (worse)
Windows MinGW BenchmarkGlobalWrite 2.164 ns/op -0.003 ns/op / -0.1% (better)
Windows MinGW BenchmarkGoroutine 60664 ns/op +938 ns/op / +1.6% (worse)
Windows MinGW BenchmarkInterfaceCall 5.563 ns/op +0.011 ns/op / +0.2% (worse)
Windows MinGW BenchmarkRuntimeGetG 1.902 ns/op 0 ns/op / +0.0%
Windows MinGW 386 BenchmarkLookupPCRandom 26.580 ns/op -0.09 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkMergeCompilerFlags 747.100 ns/op -15.6 ns/op / -2.0% (better)
Windows MinGW 386 BenchmarkMergeLinkerFlags 689.800 ns/op -6.4 ns/op / -0.9% (better)
Windows MinGW 386 BenchmarkChannelBuffered 44.710 ns/op +0.03 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkChannelHandoff 895.900 ns/op -47 ns/op / -5.0% (better)
Windows MinGW 386 BenchmarkDefer 15.240 ns/op +0.02 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkDirectCall 1.861 ns/op -0.004 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkGlobalRead 1.860 ns/op -0.006 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkGlobalWrite 7.786 ns/op -0.001 ns/op / -0.01284% (better)
Windows MinGW 386 BenchmarkGoroutine 104062 ns/op -3627 ns/op / -3.4% (better)
Windows MinGW 386 BenchmarkInterfaceCall 7.237 ns/op -0.026 ns/op / -0.4% (better)
Windows MinGW 386 BenchmarkRuntimeGetG 2.172 ns/op +0.004 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkLookupPCRandom 12.070 ns/op -0.05 ns/op / -0.4% (better)
Windows MinGW ARM64 BenchmarkMergeCompilerFlags 564.900 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 BenchmarkMergeLinkerFlags 533.600 ns/op +2 ns/op / +0.4% (worse)
Windows MinGW ARM64 BenchmarkChannelBuffered 41.460 ns/op -0.05 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkChannelHandoff 3542 ns/op -550 ns/op / -13.4% (better)
Windows MinGW ARM64 BenchmarkDefer 11.790 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 BenchmarkDirectCall 0.589 ns/op -0.0003 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkGlobalRead 0.664 ns/op +0.0002 ns/op / +0.03015% (worse)
Windows MinGW ARM64 BenchmarkGlobalWrite 0.663 ns/op -0.0002 ns/op / -0.03016% (better)
Windows MinGW ARM64 BenchmarkGoroutine 63390 ns/op -1557 ns/op / -2.4% (better)
Windows MinGW ARM64 BenchmarkInterfaceCall 3.853 ns/op -0.004 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkRuntimeGetG 1.811 ns/op +0.016 ns/op / +0.9% (worse)
Windows MSVC BenchmarkLookupPCRandom 7.094 ns/op -0.588 ns/op / -7.7% (better)
Windows MSVC BenchmarkMergeCompilerFlags 298 ns/op -12.6 ns/op / -4.1% (better)
Windows MSVC BenchmarkMergeLinkerFlags 266.100 ns/op -24.8 ns/op / -8.5% (better)
Windows MSVC BenchmarkChannelBuffered 38.120 ns/op -0.14 ns/op / -0.4% (better)
Windows MSVC BenchmarkChannelHandoff 969.200 ns/op +0.3 ns/op / +0.03096% (worse)
Windows MSVC BenchmarkDefer 9.516 ns/op +0.132 ns/op / +1.4% (worse)
Windows MSVC BenchmarkDirectCall 0.923 ns/op -0.0615 ns/op / -6.2% (better)
Windows MSVC BenchmarkGlobalRead 0.926 ns/op -0.0462 ns/op / -4.8% (better)
Windows MSVC BenchmarkGlobalWrite 4.648 ns/op -0.283 ns/op / -5.7% (better)
Windows MSVC BenchmarkGoroutine 43669 ns/op -2303 ns/op / -5.0% (better)
Windows MSVC BenchmarkInterfaceCall 4.188 ns/op -0.183 ns/op / -4.2% (better)
Windows MSVC BenchmarkRuntimeGetG 1.392 ns/op +0.232 ns/op / +20.0% (worse)
Windows MSVC 386 BenchmarkLookupPCRandom 21.570 ns/op -0.01 ns/op / -0.04634% (better)
Windows MSVC 386 BenchmarkMergeCompilerFlags 573.100 ns/op +22.7 ns/op / +4.1% (worse)
Windows MSVC 386 BenchmarkMergeLinkerFlags 530.200 ns/op -9.4 ns/op / -1.7% (better)
Windows MSVC 386 BenchmarkChannelBuffered 36.610 ns/op +0.01 ns/op / +0.02732% (worse)
Windows MSVC 386 BenchmarkChannelHandoff 990.200 ns/op +11.4 ns/op / +1.2% (worse)
Windows MSVC 386 BenchmarkDefer 14.100 ns/op 0 ns/op / +0.0%
Windows MSVC 386 BenchmarkDirectCall 1.357 ns/op 0 ns/op / +0.0%
Windows MSVC 386 BenchmarkGlobalRead 1.357 ns/op -0.001 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkGlobalWrite 6.975 ns/op -0.009 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkGoroutine 73148 ns/op -813 ns/op / -1.1% (better)
Windows MSVC 386 BenchmarkInterfaceCall 6.521 ns/op -0.002 ns/op / -0.03066% (better)
Windows MSVC 386 BenchmarkRuntimeGetG 1.634 ns/op +0.004 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkLookupPCRandom 12.070 ns/op -0.03 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkMergeCompilerFlags 569.700 ns/op -8.2 ns/op / -1.4% (better)
Windows MSVC ARM64 BenchmarkMergeLinkerFlags 528.800 ns/op -12.5 ns/op / -2.3% (better)
Windows MSVC ARM64 BenchmarkChannelBuffered 44.580 ns/op -0.53 ns/op / -1.2% (better)
Windows MSVC ARM64 BenchmarkChannelHandoff 4675 ns/op +331 ns/op / +7.6% (worse)
Windows MSVC ARM64 BenchmarkDefer 11.800 ns/op -0.28 ns/op / -2.3% (better)
Windows MSVC ARM64 BenchmarkDirectCall 0.663 ns/op +0.0001 ns/op / +0.01508% (worse)
Windows MSVC ARM64 BenchmarkGlobalRead 0.595 ns/op +0.0051 ns/op / +0.9% (worse)
Windows MSVC ARM64 BenchmarkGlobalWrite 3.796 ns/op +0.002 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkGoroutine 56290 ns/op +2212 ns/op / +4.1% (worse)
Windows MSVC ARM64 BenchmarkInterfaceCall 3.878 ns/op +0.009 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkRuntimeGetG 1.769 ns/op -0.037 ns/op / -2.0% (better)
Timer runtime benchmarks
Platform Operation and runtime ns/op vs base
Linux AfterFuncZeroDelivery/Go 903.200 ns/op -7.6 ns/op / -0.8% (better)
Linux AfterFuncZeroDelivery/LLGo 44472 ns/op +6201 ns/op / +16.2% (worse)
Linux CreateStop/Go 293.600 ns/op +0.3 ns/op / +0.1% (worse)
Linux CreateStop/LLGo 1418 ns/op +10 ns/op / +0.7% (worse)
Linux RearmStopped/Go 114.800 ns/op -0.9 ns/op / -0.8% (better)
Linux RearmStopped/LLGo 892.700 ns/op -17.7 ns/op / -1.9% (better)
Linux ResetActive/Go 67.540 ns/op -1.14 ns/op / -1.7% (better)
Linux ResetActive/LLGo 768.200 ns/op +118.9 ns/op / +18.3% (worse)
Linux ResetHeap1024/Go 67.110 ns/op -0.04 ns/op / -0.1% (better)
Linux ResetHeap1024/LLGo 132.800 ns/op -0.7 ns/op / -0.5% (better)
macOS AfterFuncZeroDelivery/Go 474.400 ns/op -93.4 ns/op / -16.4% (better)
macOS AfterFuncZeroDelivery/LLGo 72684 ns/op +17622 ns/op / +32.0% (worse)
macOS CreateStop/Go 200.800 ns/op -11.6 ns/op / -5.5% (better)
macOS CreateStop/LLGo 527.700 ns/op +1.5 ns/op / +0.3% (worse)
macOS RearmStopped/Go 57.200 ns/op -23.27 ns/op / -28.9% (better)
macOS RearmStopped/LLGo 301.700 ns/op +21.2 ns/op / +7.6% (worse)
macOS ResetActive/Go 44.550 ns/op -18.49 ns/op / -29.3% (better)
macOS ResetActive/LLGo 190.100 ns/op +28.3 ns/op / +17.5% (worse)
macOS ResetHeap1024/Go 46.930 ns/op -10.84 ns/op / -18.8% (better)
macOS ResetHeap1024/LLGo 73.620 ns/op -1.88 ns/op / -2.5% (better)
Windows MinGW AfterFuncZeroDelivery/Go 368.300 ns/op +3 ns/op / +0.8% (worse)
Windows MinGW AfterFuncZeroDelivery/LLGo 115541 ns/op -329 ns/op / -0.3% (better)
Windows MinGW CreateStop/Go 89.970 ns/op -1.71 ns/op / -1.9% (better)
Windows MinGW CreateStop/LLGo 344.400 ns/op -33.7 ns/op / -8.9% (better)
Windows MinGW RearmStopped/Go 24.460 ns/op -0.08 ns/op / -0.3% (better)
Windows MinGW RearmStopped/LLGo 169.800 ns/op -3.7 ns/op / -2.1% (better)
Windows MinGW ResetActive/Go 14.780 ns/op -0.02 ns/op / -0.1% (better)
Windows MinGW ResetActive/LLGo 128.800 ns/op +5 ns/op / +4.0% (worse)
Windows MinGW ResetHeap1024/Go 14.800 ns/op -0.08 ns/op / -0.5% (better)
Windows MinGW ResetHeap1024/LLGo 87.170 ns/op -0.14 ns/op / -0.2% (better)
Windows MinGW 386 AfterFuncZeroDelivery/Go 942.500 ns/op -18 ns/op / -1.9% (better)
Windows MinGW 386 AfterFuncZeroDelivery/LLGo 200587 ns/op -1911 ns/op / -0.9% (better)
Windows MinGW 386 CreateStop/Go 190.800 ns/op -2.8 ns/op / -1.4% (better)
Windows MinGW 386 CreateStop/LLGo 424.700 ns/op -14.8 ns/op / -3.4% (better)
Windows MinGW 386 RearmStopped/Go 63.570 ns/op +0.18 ns/op / +0.3% (worse)
Windows MinGW 386 RearmStopped/LLGo 302.300 ns/op -96 ns/op / -24.1% (better)
Windows MinGW 386 ResetActive/Go 38.890 ns/op -0.49 ns/op / -1.2% (better)
Windows MinGW 386 ResetActive/LLGo 1008 ns/op +2 ns/op / +0.2% (worse)
Windows MinGW 386 ResetHeap1024/Go 39.490 ns/op +0.14 ns/op / +0.4% (worse)
Windows MinGW 386 ResetHeap1024/LLGo 151.400 ns/op +2.2 ns/op / +1.5% (worse)
Windows MinGW ARM64 AfterFuncZeroDelivery/Go 662.800 ns/op -17.8 ns/op / -2.6% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/LLGo 151825 ns/op -2326 ns/op / -1.5% (better)
Windows MinGW ARM64 CreateStop/Go 208.800 ns/op +11 ns/op / +5.6% (worse)
Windows MinGW ARM64 CreateStop/LLGo 353.800 ns/op +35.7 ns/op / +11.2% (worse)
Windows MinGW ARM64 RearmStopped/Go 70.610 ns/op -0.04 ns/op / -0.1% (better)
Windows MinGW ARM64 RearmStopped/LLGo 163.700 ns/op -0.2 ns/op / -0.1% (better)
Windows MinGW ARM64 ResetActive/Go 31.170 ns/op +0.04 ns/op / +0.1% (worse)
Windows MinGW ARM64 ResetActive/LLGo 83.080 ns/op -20.62 ns/op / -19.9% (better)
Windows MinGW ARM64 ResetHeap1024/Go 31.240 ns/op +0.09 ns/op / +0.3% (worse)
Windows MinGW ARM64 ResetHeap1024/LLGo 91.080 ns/op +0.42 ns/op / +0.5% (worse)
Windows MSVC AfterFuncZeroDelivery/Go 419.100 ns/op -28.5 ns/op / -6.4% (better)
Windows MSVC AfterFuncZeroDelivery/LLGo 87040 ns/op -5138 ns/op / -5.6% (better)
Windows MSVC CreateStop/Go 118.700 ns/op -8.3 ns/op / -6.5% (better)
Windows MSVC CreateStop/LLGo 329.300 ns/op -83.3 ns/op / -20.2% (better)
Windows MSVC RearmStopped/Go 46.910 ns/op -3.26 ns/op / -6.5% (better)
Windows MSVC RearmStopped/LLGo 175.100 ns/op +6.8 ns/op / +4.0% (worse)
Windows MSVC ResetActive/Go 21.480 ns/op -0.81 ns/op / -3.6% (better)
Windows MSVC ResetActive/LLGo 497.200 ns/op +114.4 ns/op / +29.9% (worse)
Windows MSVC ResetHeap1024/Go 20.750 ns/op -1.23 ns/op / -5.6% (better)
Windows MSVC ResetHeap1024/LLGo 78.610 ns/op -2.74 ns/op / -3.4% (better)
Windows MSVC 386 AfterFuncZeroDelivery/Go 784.100 ns/op +2.5 ns/op / +0.3% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/LLGo 135386 ns/op +2412 ns/op / +1.8% (worse)
Windows MSVC 386 CreateStop/Go 172.900 ns/op +5.2 ns/op / +3.1% (worse)
Windows MSVC 386 CreateStop/LLGo 347.500 ns/op +35 ns/op / +11.2% (worse)
Windows MSVC 386 RearmStopped/Go 56.950 ns/op -0.24 ns/op / -0.4% (better)
Windows MSVC 386 RearmStopped/LLGo 253.900 ns/op -24.8 ns/op / -8.9% (better)
Windows MSVC 386 ResetActive/Go 32.620 ns/op +0.13 ns/op / +0.4% (worse)
Windows MSVC 386 ResetActive/LLGo 888.500 ns/op +13.1 ns/op / +1.5% (worse)
Windows MSVC 386 ResetHeap1024/Go 32.920 ns/op +0.12 ns/op / +0.4% (worse)
Windows MSVC 386 ResetHeap1024/LLGo 122.500 ns/op -1.1 ns/op / -0.9% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/Go 664.300 ns/op +9.2 ns/op / +1.4% (worse)
Windows MSVC ARM64 AfterFuncZeroDelivery/LLGo 137212 ns/op -3805 ns/op / -2.7% (better)
Windows MSVC ARM64 CreateStop/Go 193.500 ns/op -0.5 ns/op / -0.3% (better)
Windows MSVC ARM64 CreateStop/LLGo 273.400 ns/op -0.3 ns/op / -0.1% (better)
Windows MSVC ARM64 RearmStopped/Go 70.570 ns/op -0.04 ns/op / -0.1% (better)
Windows MSVC ARM64 RearmStopped/LLGo 165.300 ns/op +1.2 ns/op / +0.7% (worse)
Windows MSVC ARM64 ResetActive/Go 30.960 ns/op -0.23 ns/op / -0.7% (better)
Windows MSVC ARM64 ResetActive/LLGo 91.480 ns/op +5.59 ns/op / +6.5% (worse)
Windows MSVC ARM64 ResetHeap1024/Go 30.910 ns/op -0.25 ns/op / -0.8% (better)
Windows MSVC ARM64 ResetHeap1024/LLGo 92.890 ns/op -0.34 ns/op / -0.4% (better)

Compared with f4f1d75b62cc measured in the same runner job.

@visualfc visualfc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

审查通过。

typeof 换成 __typeof__ 正确覆盖了 Clang 在 -std=c11 下函数和宏两条生成路径。test/cgo/c11 复现了 #3034,构建约束 cgo && !wasm 与现有 native Cgo fixture 一致。宏路径目前只有单测覆盖,不阻塞合并。

@cpunion
cpunion merged commit 02509e6 into xgo-dev:main Nov 10, 2026
112 of 113 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.

cgo: generated typeof declarations fail with -std=c11 while Go succeeds

2 participants