Skip to content

runtime: fix native allocation event reporting - #3043

Merged
cpunion merged 4 commits into
xgo-dev:mainfrom
cpunion:fix/2923-bdwgc-allocation-counters
Nov 12, 2026
Merged

cpunion merged 4 commits into
xgo-dev:mainfrom
cpunion:fix/2923-bdwgc-allocation-counters

Conversation

@cpunion

@cpunion cpunion commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #2923.

Populate native BDWGC MemStats.Mallocs from the existing managed-allocation counters, so AllocsPerRun and B.ReportAllocs detect escaping allocations. Adds positive/zero-allocation controls without adding allocator work.

For 1,000 escaping 1 KiB slices:

Metric Go 1.27.3 LLGo main This PR
Mallocs 1,000 0 1,000
AllocsPerRun 1 0 1
TotalAlloc (bytes) 1,024,000 1,344,000 1,344,000

BDWGC byte accounting is unchanged; Frees/HeapObjects remain unavailable (zero). The metrics shim no longer substitutes cumulative allocations for the unavailable live-object count.

Validated on macOS/arm64 and Linux/amd64, including allocation controls, existing zero-allocation checks, native runtime suites and focused full-LTO tests. WASI allocation and metrics tests also pass. go vet ./... matches the 12 baseline diagnostics.

CI: retain official HTTPS mirror fallback in the existing Ubuntu setup helper after repeated archive TLS failures; no new jobs.

@cpunion

cpunion commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator Author

@fennoai Please review this fix for native allocation-event reporting. The regression tests fail on main and pass on macOS/arm64 and Linux/amd64.

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review summary

This PR wires the native BDWGC runtime's MemStats.Mallocs to the Go allocator's existing size-class object counters via a new MemProfileMallocs(), and adds a focused test suite plus doc updates. The change is well-scoped, honestly commented, and the new aggregation is correct and monotonic.

Verified during review:

  • MemProfileMallocs() is non-allocating (stack-local sum + atomic loads over a fixed 27-bucket array), so the test's ReadMemStats-allocates-0 assertion holds.
  • The per-allocation hot path (recordMemProfileAlloc) is untouched; MemProfileMallocs only reads counters that path already maintains.
  • Atomic usage is sound: atomic.Add/atomic.Load on the !baremetal path give per-word consistency; the non-atomic baremetal counter is not activated because the baremetal/wasm ReadMemStats sources stats from tinygogc, not MemProfileMallocs().
  • No new unsafe usage, no truncation/overflow concerns (all widening casts, uint64 sum), and no security-relevant surface (runtime-internal GC accounting, no untrusted input).
  • Docs/comments accurately describe the new behavior; the historical "not used because of #2923" text was fully removed and no stale references remain.

One item worth addressing (see inline): Frees is left unset in the BDWGC path, which makes the derived HeapObjects a cumulative allocation total rather than a live-object count. This is likely an intentional BDWGC limitation, but it has an undocumented downstream effect on the runtime/metrics object counters and is worth a one-line note.

Non-blocking review.

@fennoai

fennoai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

This turn is in managed mode, so I'll return my review as Markdown in my final message rather than publishing a comment or PR review myself. The workspace is already checked out at the same head SHA (301405d) from the prior review, and I verified the key finding against the consumer code. Here is my review.


Review: native allocation-event reporting (PR #3043)

I reviewed the diff across code-quality, performance, security, and documentation-accuracy, and verified the findings against the actual metrics consumers. The change is well-scoped and correct for its stated goal: MemStats.Mallocs on the native BDWGC path now reports managed allocation events via a new MemProfileMallocs() that sums the allocator's existing size-class counters.

On your note that the regression tests fail on main and pass on macOS/arm64 and Linux/amd64 — that matches what the code does. Before this fix, the BDWGC ReadMemStats left Mallocs at 0, so TestReadMemStatsAllocationEvents (after.Mallocs - before.Mallocs < 1000) and the benchmark AllocsPerOp() < 1 checks would fail; now Mallocs is wired through and the counters advance. The test file is gated //go:build !nogc, and the counted path (recordMemProfileAlloc) is exercised on both of those targets, so the pass/fail split is consistent with the change rather than incidental.

Verified during review:

  • MemProfileMallocs() is non-allocating (stack-local sum + atomic loads over a fixed 27-bucket array), so the ReadMemStats-allocates-0 assertion in TestAllocationEventControls holds.
  • The per-allocation hot path (recordMemProfileAlloc) is untouched — the new function only reads counters that path already maintains; //go:noinline is preserved, so allocation call sites aren't bloated.
  • Atomic usage is sound: atomic.Add/atomic.Load on the !baremetal path give per-word consistency. The non-atomic baremetal counter is not activated, because the baremetal/wasm ReadMemStats (runtime_gc_nonmoving.go) sources stats from tinygogc, not MemProfileMallocs().
  • No new unsafe, no truncation/overflow (all widening casts, uint64 sum), no security-relevant surface (runtime-internal GC accounting, no untrusted input).
  • Docs/comments accurately describe the new behavior; the old "not used because of runtime: BDWGC allocation counters make AllocsPerRun report false zero #2923" text was fully removed with no stale references left.
  • The zero-sized and in-place AllocsPerRun == 0 assertions are robust (double-guarded by the size == 0 early returns), and the < 1000 cumulative check is correctly lenient rather than exact.

Findings

[P2] runtime/internal/lib/runtime/runtime_gc.go:34 — Frees left unset makes HeapObjects a cumulative count, not a live count

Mallocs is now populated, but Frees stays at 0 on this BDWGC path (unlike the sibling nonmoving path at runtime_gc_nonmoving.go:18-19, which sets both). Since runtime_gc.go also leaves HeapObjects unset (== 0), the metrics shim derives it:

  • runtime/_patch/runtime/metrics/memstats_llgo.go:11 → HeapObjects = Mallocs - Frees = Mallocs

So after this change:

  • /gc/heap/objects:objects (read_llgo.go:65) reports a monotonically increasing cumulative allocation total, not a live-object count — it never decreases across GC cycles even though BDWGC reclaims objects.
  • /gc/heap/frees:objects (read_llgo.go:59) stays 0 despite real collections.

This yields an internally inconsistent snapshot: Alloc/TotalAlloc reflect BDWGC accounting (where Alloc can shrink after GC) while Mallocs/HeapObjects only ever grow, diverging from Go's documented HeapObjects == Mallocs - Frees meaning. If leaving Frees == 0 is the intended tradeoff (BDWGC can't cheaply report collected-object counts, per the comment just

View session

@cpunion

cpunion commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator Author

@fennoai Updated in 4d51f74, including the metrics consequence and its regression test. Please re-review.

@fennoai

fennoai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

The grep for HeapObjects in tinygogc returned 0 — GCStats has no HeapObjects field, so tinygogc tracks only Mallocs/Frees and the new explicit HeapObjects = Mallocs - Frees in the nonmoving ReadMemStats is the correct and only place it's computed. The gcFrees counter is only incremented when gcMallocs objects are actually freed (sweep), so Mallocs >= Frees holds and the subtraction won't underflow. The one-line command's second grep didn't run due to the earlier non-match exit, but I've already confirmed the invariant from the counter semantics (free happens during sweep of previously-allocated objects) in the prior review turn.

The re-review is complete. All concerns from my prior review are resolved. Since this turn is in managed mode, I'll return the review as Markdown in my final message.


Re-review: PR #3043 — commit 4d51f74 ("keep unavailable BDWGC live object metrics unset")

Thanks for the quick turnaround. I re-fetched at the new head (4d51f74) and reviewed the incremental change against 301405d. Both findings from my prior review are resolved, and the fix is correct and well-targeted. This is good to go from my side.

What changed and why it's right

[P2] resolved — metrics consequence handled correctly. Rather than papering over the missing live count, the fix removes the misleading derivation and keeps the unavailable metrics honestly unset:

  • memstats_llgo.go — dropped the HeapObjects = Mallocs - Frees fallback. This was the root of the problem: it turned "no live count available" into a cumulative allocation total. Removing it means /gc/heap/objects:objects and /gc/heap/frees:objects now correctly report 0 on the BDWGC path instead of an ever-growing number. The new comment states the intent clearly.
  • runtime_gc.go — the comment now explicitly documents that Frees and HeapObjects stay zero, "including in runtime/metrics." That's exactly the documentation gap I flagged.
  • runtime_gc_nonmoving.go — correctly compensates for the global derivation removal: since memstats_llgo.go no longer back-fills HeapObjects, the nonmoving (tinygogc) path now sets HeapObjects = Mallocs - Frees itself. I verified this is sound: GCStats has no HeapObjects field (so this is the single, correct source), and Frees only advances during sweep of previously-allocated objects, so Mallocs >= Frees holds — no unsigned underflow.

New regression test is precisely scoped. test/std/runtime/metrics/objects_bdwgc_test.go is gated //go:build llgo && !baremetal && !wasm && !nogc (BDWGC path only) and asserts the exact contract: /gc/heap/allocs:objects advances (events are reported) while /gc/heap/objects:objects and /gc/heap/frees:objects stay 0 (live/free counts remain unavailable rather than silently becoming cumulative). It calls runtime.GC() first so the assertion is meaningful. This directly guards the behavior that regressed before.

[P3] resolved. The TestReadMemStatsAllocationEvents failure message now includes want >= 1000, consistent with the sibling messages.

Everything from the first pass still holds

MemProfileMallocs() remains non-allocating and off the per-allocation hot path; atomic usage is sound on the !baremetal path; no new unsafe, no truncation/overflow; docs are consistent with the new behavior. On your note about the regression tests — the split (fail on main, pass on macOS/arm64 and Linux/amd64) is consistent with the change: the //go:build !nogc allocation-event tests and the new BDWGC metrics test exercise the counters that main left at zero.

No remaining findings. The snapshot is now internally consistent: byte totals follow BDWGC accounting, allocation events are reported via the Go allocator's counters, and live/free object counts are honestly left unset where BDWGC can't provide them.

View session

@codecov

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

Copy link
Copy Markdown
Collaborator Author

@fennoai Applied the shared CI fix for the repeated Ubuntu archive TLS failures: prioritize the official Azure HTTPS mirror and retain archive/security HTTPS fallback in the existing setup helper. Sources and signing keys are preserved; helper and workflow-contract tests pass, with no new jobs. Please re-review this CI-only update.

@fennoai

fennoai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

I have full verification now. The claims check out:

  • ubuntu_apt_test.py is run in CI (action.yml:858) before the configure script runs, so the test gates the change.
  • The invocation (action.yml:859-860) is unchanged — no new jobs added; this is purely a helper-logic change.
  • Sources and Signed-By keys are preserved (the test asserts sources.read_text() == source_text unchanged, and configure never touches the sources/keyring files — it only rewrites the two mirror-list files when they exist).

Let me do one final idempotency check — configure is called twice in the test (line 36-37) and must produce the same output (not keep appending). The output is write_text (full overwrite, not append) derived only from the hardcoded mirror tuples, independent of existing file contents, so it's idempotent. The test asserts this. Good.

The change is correct and well-verified. Since this is managed mode, I'll return my re-review as Markdown.


Re-review: PR #3043 — commit dfd097d ("ci: fall back across official Ubuntu HTTPS mirrors")

I re-fetched at the new head (dfd097d) and reviewed the incremental change since 4d51f74. It's CI-only, touching just .github/actions/setup-deps/ubuntu_apt.py and its test. The change is correct and your claims check out — this looks good to merge. No findings.

Verified

  • Mirror-list syntax is valid per APT's documented format. The helper now writes tab-separated URL\tpriority:N lines, which is exactly what apt-transport-mirror(1) specifies: "Metadata about a mirror can be given on the same line, separated from the URI by a tab," and "the mirrors with the lowest number are tried first." So priority:1 (Azure) is tried before priority:2 (archive/security), giving the deterministic fallback you describe instead of APT's otherwise-random mirror selection. The feature requires apt ≥ 1.6; Ubuntu runners (noble, apt 2.7+) satisfy that comfortably.
  • Azure prioritized, official HTTPS fallback retained. amd64/i386 get azure.archive.ubuntu.com at priority 1 with archive.ubuntu.com / security.ubuntu.com at priority 2; arm64 keeps the single ports.ubuntu.com entry. All HTTPS, all official Ubuntu endpoints — no third-party mirrors introduced.
  • Sources and signing keys preserved. configure only rewrites the two apt-mirrors*.txt files when they already exist; it never touches ubuntu.sources or the keyring. The test asserts sources.read_text() and the third-party custom-mirrors.txt are byte-for-byte unchanged, and that Signed-By: .../ubuntu-archive-keyring.gpg survives.
  • Idempotent. configure is invoked twice in the test and write_text fully overwrites from the hardcoded tuples (independent of prior file contents), so it won't accumulate duplicate lines across re-runs.
  • Tests pass locally. I ran python3 -m unittest ubuntu_apt_test — both cases pass, including the new i386 sub-case and the "direct sources need no mirror lists" case.
  • No new jobs. The action.yml invocation (ubuntu_apt_test.py then ubuntu_apt.py /etc/apt <arch>) is unchanged; the test already runs inline in the existing "Install Ubuntu dependencies" step, so it gates this change without adding workflow surface.

Minor observations (non-blocking, no action needed)

  • Pointing the security list's first-choice at azure.archive.ubuntu.com is fine: the Azure mirror carries the -security suites, and security.ubuntu.com remains as the priority-2 fallback, so security updates stay reachable even if Azure is degraded.
  • The earlier runtime/metrics work (allocation events, Frees/HeapObjects handling from commit 4d51f74) is unchanged by this commit and remains in the state I approved in the prior round.

Nothing else to flag. The full PR — allocation-event reporting plus this CI resilience fix — is in good shape from my side.

View task

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

LLGo WebAssembly build benchmarks

af333c3a4f11 | 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 1634130 B +72 B / +0.004406% (worse) 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 1699203 B +47 B / +0.002766% (worse) 89416 B 0 B / +0.0%
fmtprintf/j64-emscripten-memory64/LLGo 1515066 B +67 B / +0.004422% (worse) 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 1372702 B +60 B / +0.004371% (worse) 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 1385547 B +76 B / +0.005485% (worse) 79699 B 0 B / +0.0%
reflectcall/j64-emscripten-memory64/LLGo 1256982 B +71 B / +0.005649% (worse) 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 10.181 s -847 ms / -7.7% (better)
j32-goos-js 9.756 s -853.8 ms / -8.0% (better)
j64-emscripten-memory64 8.747 s -1.022 s / -10.5% (better)
reflectcall/w32-wasi 36.860 s -1.257 s / -3.3% (better)
w32-goos-wasip1 5.000 s -922 ms / -15.6% (better)
w32-wasi 4.626 s -864.5 ms / -15.7% (better)

Compared with e2cca2cb8786 measured in the same runner job.

@github-actions

Copy link
Copy Markdown

LLGo baseline benchmarks

dfd097dd4b7f | workflow run | long-term charts

String equality benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkStringEquality/bytes/equal/1024/Go 25.800 ns/op -7.91 ns/op / -23.5% (better)
Linux BenchmarkStringEquality/bytes/equal/1024/LLGo 62.750 ns/op -6.78 ns/op / -9.8% (better)
Linux BenchmarkStringEquality/bytes/equal/128/Go 20.020 ns/op +11.67 ns/op / +139.9% (worse)
Linux BenchmarkStringEquality/bytes/equal/128/LLGo 11.910 ns/op -0.08 ns/op / -0.7% (better)
Linux BenchmarkStringEquality/bytes/equal/8/Go 5.926 ns/op +0.08 ns/op / +1.4% (worse)
Linux BenchmarkStringEquality/bytes/equal/8/LLGo 4.702 ns/op +0.376 ns/op / +8.7% (worse)
Linux BenchmarkStringEquality/bytes/first/1024/Go 6.614 ns/op -0.82 ns/op / -11.0% (better)
Linux BenchmarkStringEquality/bytes/first/1024/LLGo 3.111 ns/op -0.345 ns/op / -10.0% (better)
Linux BenchmarkStringEquality/bytes/first/128/Go 6.622 ns/op -0.027 ns/op / -0.4% (better)
Linux BenchmarkStringEquality/bytes/first/128/LLGo 3.304 ns/op -0.101 ns/op / -3.0% (better)
Linux BenchmarkStringEquality/bytes/first/8/Go 5.852 ns/op 0 ns/op / +0.0%
Linux BenchmarkStringEquality/bytes/first/8/LLGo 3.113 ns/op +0.255 ns/op / +8.9% (worse)
Linux BenchmarkStringEquality/bytes/last/1024/Go 25.140 ns/op -1.33 ns/op / -5.0% (better)
Linux BenchmarkStringEquality/bytes/last/1024/LLGo 62.590 ns/op -0.92 ns/op / -1.4% (better)
Linux BenchmarkStringEquality/bytes/last/128/Go 8.153 ns/op -0.026 ns/op / -0.3% (better)
Linux BenchmarkStringEquality/bytes/last/128/LLGo 11.690 ns/op -0.8 ns/op / -6.4% (better)
Linux BenchmarkStringEquality/bytes/last/8/Go 5.817 ns/op -0.026 ns/op / -0.4% (better)
Linux BenchmarkStringEquality/bytes/last/8/LLGo 3.888 ns/op -0.14 ns/op / -3.5% (better)
Linux BenchmarkStringEquality/strings/equal/1024/Go 23.230 ns/op -8.21 ns/op / -26.1% (better)
Linux BenchmarkStringEquality/strings/equal/1024/LLGo 54.790 ns/op -8.88 ns/op / -13.9% (better)
Linux BenchmarkStringEquality/strings/equal/128/Go 8.291 ns/op +0.092 ns/op / +1.1% (worse)
Linux BenchmarkStringEquality/strings/equal/128/LLGo 11.110 ns/op -1.64 ns/op / -12.9% (better)
Linux BenchmarkStringEquality/strings/equal/8/Go 5.881 ns/op -0.033 ns/op / -0.6% (better)
Linux BenchmarkStringEquality/strings/equal/8/LLGo 8.335 ns/op +4.006 ns/op / +92.5% (worse)
Linux BenchmarkStringEquality/strings/first/1024/Go 6.617 ns/op -0.071 ns/op / -1.1% (better)
Linux BenchmarkStringEquality/strings/first/1024/LLGo 2.721 ns/op -2.964 ns/op / -52.1% (better)
Linux BenchmarkStringEquality/strings/first/128/Go 14.530 ns/op +7.929 ns/op / +120.1% (worse)
Linux BenchmarkStringEquality/strings/first/128/LLGo 2.732 ns/op -0.854 ns/op / -23.8% (better)
Linux BenchmarkStringEquality/strings/first/8/Go 5.877 ns/op +0.024 ns/op / +0.4% (worse)
Linux BenchmarkStringEquality/strings/first/8/LLGo 2.723 ns/op -0.816 ns/op / -23.1% (better)
Linux BenchmarkStringEquality/strings/last/1024/Go 22.640 ns/op -0.82 ns/op / -3.5% (better)
Linux BenchmarkStringEquality/strings/last/1024/LLGo 54.570 ns/op -3.58 ns/op / -6.2% (better)
Linux BenchmarkStringEquality/strings/last/128/Go 8.142 ns/op -0.015 ns/op / -0.2% (better)
Linux BenchmarkStringEquality/strings/last/128/LLGo 11.170 ns/op -0.09 ns/op / -0.8% (better)
Linux BenchmarkStringEquality/strings/last/8/Go 5.832 ns/op -0.026 ns/op / -0.4% (better)
Linux BenchmarkStringEquality/strings/last/8/LLGo 3.508 ns/op -0.859 ns/op / -19.7% (better)
macOS BenchmarkStringEquality/bytes/equal/1024/Go 25.430 ns/op -7.04 ns/op / -21.7% (better)
macOS BenchmarkStringEquality/bytes/equal/1024/LLGo 25.600 ns/op -2.26 ns/op / -8.1% (better)
macOS BenchmarkStringEquality/bytes/equal/128/Go 5.993 ns/op -0.088 ns/op / -1.4% (better)
macOS BenchmarkStringEquality/bytes/equal/128/LLGo 4.811 ns/op +0.181 ns/op / +3.9% (worse)
macOS BenchmarkStringEquality/bytes/equal/8/Go 3.525 ns/op -0.107 ns/op / -2.9% (better)
macOS BenchmarkStringEquality/bytes/equal/8/LLGo 2.912 ns/op +0.036 ns/op / +1.3% (worse)
macOS BenchmarkStringEquality/bytes/first/1024/Go 3.729 ns/op -0.688 ns/op / -15.6% (better)
macOS BenchmarkStringEquality/bytes/first/1024/LLGo 1.693 ns/op -0.153 ns/op / -8.3% (better)
macOS BenchmarkStringEquality/bytes/first/128/Go 4.160 ns/op +0.23 ns/op / +5.9% (worse)
macOS BenchmarkStringEquality/bytes/first/128/LLGo 1.835 ns/op +0.019 ns/op / +1.0% (worse)
macOS BenchmarkStringEquality/bytes/first/8/Go 3.766 ns/op -0.101 ns/op / -2.6% (better)
macOS BenchmarkStringEquality/bytes/first/8/LLGo 1.862 ns/op +0.036 ns/op / +2.0% (worse)
macOS BenchmarkStringEquality/bytes/last/1024/Go 24.340 ns/op -6.85 ns/op / -22.0% (better)
macOS BenchmarkStringEquality/bytes/last/1024/LLGo 22.770 ns/op -2.69 ns/op / -10.6% (better)
macOS BenchmarkStringEquality/bytes/last/128/Go 5.566 ns/op +0.036 ns/op / +0.7% (worse)
macOS BenchmarkStringEquality/bytes/last/128/LLGo 4.045 ns/op +0.026 ns/op / +0.6% (worse)
macOS BenchmarkStringEquality/bytes/last/8/Go 3.751 ns/op -0.721 ns/op / -16.1% (better)
macOS BenchmarkStringEquality/bytes/last/8/LLGo 2.624 ns/op +0.07 ns/op / +2.7% (worse)
macOS BenchmarkStringEquality/strings/equal/1024/Go 25.010 ns/op -0.55 ns/op / -2.2% (better)
macOS BenchmarkStringEquality/strings/equal/1024/LLGo 24.270 ns/op -2.15 ns/op / -8.1% (better)
macOS BenchmarkStringEquality/strings/equal/128/Go 5.979 ns/op -0.007 ns/op / -0.1% (better)
macOS BenchmarkStringEquality/strings/equal/128/LLGo 4.706 ns/op +0.054 ns/op / +1.2% (worse)
macOS BenchmarkStringEquality/strings/equal/8/Go 3.707 ns/op -0.076 ns/op / -2.0% (better)
macOS BenchmarkStringEquality/strings/equal/8/LLGo 2.801 ns/op -0.07 ns/op / -2.4% (better)
macOS BenchmarkStringEquality/strings/first/1024/Go 3.723 ns/op -0.867 ns/op / -18.9% (better)
macOS BenchmarkStringEquality/strings/first/1024/LLGo 1.756 ns/op -0.14 ns/op / -7.4% (better)
macOS BenchmarkStringEquality/strings/first/128/Go 4.128 ns/op +0.228 ns/op / +5.8% (worse)
macOS BenchmarkStringEquality/strings/first/128/LLGo 1.834 ns/op +0.057 ns/op / +3.2% (worse)
macOS BenchmarkStringEquality/strings/first/8/Go 3.760 ns/op +0.048 ns/op / +1.3% (worse)
macOS BenchmarkStringEquality/strings/first/8/LLGo 1.747 ns/op -0.048 ns/op / -2.7% (better)
macOS BenchmarkStringEquality/strings/last/1024/Go 24.930 ns/op -6.63 ns/op / -21.0% (better)
macOS BenchmarkStringEquality/strings/last/1024/LLGo 23.480 ns/op -6.3 ns/op / -21.2% (better)
macOS BenchmarkStringEquality/strings/last/128/Go 5.729 ns/op +0.138 ns/op / +2.5% (worse)
macOS BenchmarkStringEquality/strings/last/128/LLGo 4.159 ns/op +0.025 ns/op / +0.6% (worse)
macOS BenchmarkStringEquality/strings/last/8/Go 3.533 ns/op -0.355 ns/op / -9.1% (better)
macOS BenchmarkStringEquality/strings/last/8/LLGo 3.075 ns/op +0.497 ns/op / +19.3% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/1024/Go 18.290 ns/op +1.42 ns/op / +8.4% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/1024/LLGo 35.140 ns/op +0.35 ns/op / +1.0% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/128/Go 5.830 ns/op -0.479 ns/op / -7.6% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/128/LLGo 9.470 ns/op +0.123 ns/op / +1.3% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/8/Go 5.780 ns/op +0.068 ns/op / +1.2% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/8/LLGo 3.790 ns/op -0.001 ns/op / -0.02638% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/1024/Go 5.746 ns/op -0.278 ns/op / -4.6% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/1024/LLGo 2.978 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/128/Go 5.731 ns/op +0.03 ns/op / +0.5% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/128/LLGo 2.980 ns/op +0.002 ns/op / +0.1% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/8/Go 4.888 ns/op -0.022 ns/op / -0.4% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/8/LLGo 2.981 ns/op +0.003 ns/op / +0.1% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/1024/Go 16.420 ns/op +0.2 ns/op / +1.2% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/1024/LLGo 34.490 ns/op -0.21 ns/op / -0.6% (better)
Windows MinGW BenchmarkStringEquality/bytes/last/128/Go 6.013 ns/op +0.004 ns/op / +0.1% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/128/LLGo 8.595 ns/op +0.031 ns/op / +0.4% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/8/Go 4.936 ns/op +0.043 ns/op / +0.9% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/8/LLGo 3.252 ns/op +0.003 ns/op / +0.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/1024/Go 15.550 ns/op -0.05 ns/op / -0.3% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/1024/LLGo 30.700 ns/op +0.32 ns/op / +1.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/128/Go 6.804 ns/op +1.033 ns/op / +17.9% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/128/LLGo 6.109 ns/op -0.129 ns/op / -2.1% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/8/Go 4.758 ns/op -0.196 ns/op / -4.0% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/8/LLGo 2.711 ns/op +0.003 ns/op / +0.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/1024/Go 6.150 ns/op +0.408 ns/op / +7.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/1024/LLGo 1.898 ns/op +0.003 ns/op / +0.2% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/128/Go 4.796 ns/op -0.101 ns/op / -2.1% (better)
Windows MinGW BenchmarkStringEquality/strings/first/128/LLGo 1.896 ns/op +0.001 ns/op / +0.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/8/Go 5.508 ns/op +0.067 ns/op / +1.2% (worse)
Windows MinGW BenchmarkStringEquality/strings/first/8/LLGo 1.895 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkStringEquality/strings/last/1024/Go 14.530 ns/op -0.08 ns/op / -0.5% (better)
Windows MinGW BenchmarkStringEquality/strings/last/1024/LLGo 30.360 ns/op +0.12 ns/op / +0.4% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/128/Go 5.407 ns/op -0.039 ns/op / -0.7% (better)
Windows MinGW BenchmarkStringEquality/strings/last/128/LLGo 6.767 ns/op +0.598 ns/op / +9.7% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/8/Go 5.720 ns/op +0.006 ns/op / +0.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/8/LLGo 2.168 ns/op -0.003 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/1024/Go 32.180 ns/op -0.37 ns/op / -1.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/1024/LLGo 35.280 ns/op +0.32 ns/op / +0.9% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/128/Go 10.010 ns/op -0.27 ns/op / -2.6% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/128/LLGo 8.128 ns/op -0.176 ns/op / -2.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/8/Go 7.603 ns/op +0.098 ns/op / +1.3% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/8/LLGo 4.537 ns/op -0.181 ns/op / -3.8% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/1024/Go 8.259 ns/op +0.028 ns/op / +0.3% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/1024/LLGo 3.944 ns/op +0.039 ns/op / +1.0% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/128/Go 8.175 ns/op -0.021 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/128/LLGo 3.890 ns/op -0.075 ns/op / -1.9% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/8/Go 6.575 ns/op -0.398 ns/op / -5.7% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/8/LLGo 3.805 ns/op -0.109 ns/op / -2.8% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/1024/Go 31.660 ns/op -0.35 ns/op / -1.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/1024/LLGo 34.860 ns/op -0.75 ns/op / -2.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/128/Go 9.561 ns/op -0.187 ns/op / -1.9% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/128/LLGo 7.365 ns/op +0.296 ns/op / +4.2% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/8/Go 7.361 ns/op +0.221 ns/op / +3.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/8/LLGo 4.569 ns/op -0.039 ns/op / -0.8% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/1024/Go 28.710 ns/op -0.5 ns/op / -1.7% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/1024/LLGo 34.320 ns/op -0.44 ns/op / -1.3% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/128/Go 9.394 ns/op -0.017 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/128/LLGo 7.805 ns/op -0.013 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/8/Go 7.548 ns/op +0.232 ns/op / +3.2% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/8/LLGo 4.632 ns/op +0.057 ns/op / +1.2% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/1024/Go 7.742 ns/op -0.068 ns/op / -0.9% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/1024/LLGo 3.906 ns/op -0.078 ns/op / -2.0% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/128/Go 8.360 ns/op +0.709 ns/op / +9.3% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/128/LLGo 3.697 ns/op -0.239 ns/op / -6.1% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/8/Go 6.571 ns/op -0.475 ns/op / -6.7% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/8/LLGo 3.797 ns/op -0.189 ns/op / -4.7% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/1024/Go 28.830 ns/op +0.51 ns/op / +1.8% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/last/1024/LLGo 33.250 ns/op -2.09 ns/op / -5.9% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/128/Go 9.074 ns/op -0.03 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/128/LLGo 7.056 ns/op -0.076 ns/op / -1.1% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/8/Go 6.991 ns/op -0.125 ns/op / -1.8% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/8/LLGo 4.593 ns/op +0.133 ns/op / +3.0% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/1024/Go 31.430 ns/op +0.23 ns/op / +0.7% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/1024/LLGo 39.150 ns/op +0.07 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/128/Go 6.769 ns/op +0.073 ns/op / +1.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/128/LLGo 6.900 ns/op -0.199 ns/op / -2.8% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/8/Go 3.740 ns/op +0.032 ns/op / +0.9% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/8/LLGo 2.710 ns/op +0.227 ns/op / +9.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/1024/Go 4.718 ns/op -0.017 ns/op / -0.4% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/1024/LLGo 1.616 ns/op +0.041 ns/op / +2.6% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/128/Go 4.778 ns/op -0.016 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/128/LLGo 1.635 ns/op +0.051 ns/op / +3.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/8/Go 3.333 ns/op -0.146 ns/op / -4.2% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/8/LLGo 1.626 ns/op +0.095 ns/op / +6.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/1024/Go 31.150 ns/op +0.14 ns/op / +0.5% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/1024/LLGo 38.780 ns/op -0.26 ns/op / -0.7% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/128/Go 6.703 ns/op +0.018 ns/op / +0.3% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/128/LLGo 6.761 ns/op -0.069 ns/op / -1.0% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/8/Go 3.530 ns/op +0.042 ns/op / +1.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/8/LLGo 2.226 ns/op +0.029 ns/op / +1.3% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/1024/Go 27.450 ns/op -0.06 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/1024/LLGo 35.990 ns/op -0.11 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/128/Go 6.106 ns/op +0.033 ns/op / +0.5% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/128/LLGo 5.908 ns/op +0.073 ns/op / +1.3% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/8/Go 3.938 ns/op +0.033 ns/op / +0.8% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/8/LLGo 2.444 ns/op -0.241 ns/op / -9.0% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/1024/Go 4.545 ns/op -0.03 ns/op / -0.7% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/1024/LLGo 1.831 ns/op +0.222 ns/op / +13.8% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/128/Go 4.502 ns/op -0.13 ns/op / -2.8% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/128/LLGo 1.728 ns/op +0.122 ns/op / +7.6% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/8/Go 3.907 ns/op +0.004 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/8/LLGo 1.720 ns/op +0.099 ns/op / +6.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/1024/Go 27.110 ns/op -0.04 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/1024/LLGo 35.570 ns/op -0.14 ns/op / -0.4% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/128/Go 5.922 ns/op -0.002 ns/op / -0.03376% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/128/LLGo 5.479 ns/op +0.019 ns/op / +0.3% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/8/Go 3.882 ns/op -0.025 ns/op / -0.6% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/8/LLGo 2.213 ns/op +0.32 ns/op / +16.9% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/1024/Go 21.560 ns/op -0.02 ns/op / -0.1% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/1024/LLGo 36.100 ns/op -0.58 ns/op / -1.6% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/128/Go 6.908 ns/op -0.194 ns/op / -2.7% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/128/LLGo 7.952 ns/op -0.077 ns/op / -1.0% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/8/Go 5.192 ns/op +0.057 ns/op / +1.1% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/8/LLGo 4.273 ns/op -0.052 ns/op / -1.2% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/1024/Go 5.215 ns/op -0.026 ns/op / -0.5% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/1024/LLGo 2.949 ns/op -0.031 ns/op / -1.0% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/128/Go 5.378 ns/op +0.018 ns/op / +0.3% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/128/LLGo 2.910 ns/op -0.098 ns/op / -3.3% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/8/Go 5.431 ns/op +0.309 ns/op / +6.0% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/8/LLGo 2.919 ns/op -0.085 ns/op / -2.8% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/1024/Go 20.760 ns/op -0.36 ns/op / -1.7% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/1024/LLGo 37.060 ns/op -0.49 ns/op / -1.3% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/128/Go 6.673 ns/op +0.184 ns/op / +2.8% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/128/LLGo 7.814 ns/op -0.12 ns/op / -1.5% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/8/Go 5.227 ns/op -0.467 ns/op / -8.2% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/8/LLGo 3.670 ns/op -0.118 ns/op / -3.1% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/1024/Go 23.010 ns/op +5.84 ns/op / +34.0% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/1024/LLGo 32.060 ns/op -0.22 ns/op / -0.7% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/128/Go 7.006 ns/op -0.298 ns/op / -4.1% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/128/LLGo 6.847 ns/op -0.148 ns/op / -2.1% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/8/Go 5.404 ns/op +0.264 ns/op / +5.1% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/8/LLGo 4.213 ns/op +0.567 ns/op / +15.6% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/1024/Go 5.417 ns/op +0.073 ns/op / +1.4% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/1024/LLGo 2.295 ns/op +0.017 ns/op / +0.7% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/128/Go 5.342 ns/op +0.243 ns/op / +4.8% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/128/LLGo 2.337 ns/op +0.063 ns/op / +2.8% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/8/Go 5.132 ns/op -0.228 ns/op / -4.3% (better)
Windows MSVC BenchmarkStringEquality/strings/first/8/LLGo 2.264 ns/op -0.073 ns/op / -3.1% (better)
Windows MSVC BenchmarkStringEquality/strings/last/1024/Go 15.650 ns/op -0.94 ns/op / -5.7% (better)
Windows MSVC BenchmarkStringEquality/strings/last/1024/LLGo 31.860 ns/op -0.21 ns/op / -0.7% (better)
Windows MSVC BenchmarkStringEquality/strings/last/128/Go 6.346 ns/op -0.532 ns/op / -7.7% (better)
Windows MSVC BenchmarkStringEquality/strings/last/128/LLGo 6.690 ns/op -0.07 ns/op / -1.0% (better)
Windows MSVC BenchmarkStringEquality/strings/last/8/Go 5.218 ns/op +0.289 ns/op / +5.9% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/8/LLGo 2.989 ns/op -0.381 ns/op / -11.3% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/1024/Go 26.560 ns/op -0.09 ns/op / -0.3% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/1024/LLGo 72.440 ns/op -1.45 ns/op / -2.0% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/128/Go 8.174 ns/op -0.009 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/128/LLGo 13.680 ns/op -0.04 ns/op / -0.3% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/8/Go 6.010 ns/op -0.071 ns/op / -1.2% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/8/LLGo 3.928 ns/op +0.057 ns/op / +1.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/1024/Go 6.731 ns/op +0.046 ns/op / +0.7% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/1024/LLGo 3.203 ns/op -0.007 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/128/Go 6.708 ns/op +0.079 ns/op / +1.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/128/LLGo 3.204 ns/op -0.017 ns/op / -0.5% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/8/Go 5.635 ns/op -0.345 ns/op / -5.8% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/8/LLGo 3.208 ns/op -0.262 ns/op / -7.6% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/1024/Go 26.190 ns/op -0.26 ns/op / -1.0% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/1024/LLGo 73.260 ns/op +0.22 ns/op / +0.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/128/Go 7.888 ns/op +0.009 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/128/LLGo 13.370 ns/op 0 ns/op / +0.0%
Windows MSVC 386 BenchmarkStringEquality/bytes/last/8/Go 6.052 ns/op -0.21 ns/op / -3.4% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/8/LLGo 3.615 ns/op -0.01 ns/op / -0.3% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/1024/Go 23.700 ns/op -0.04 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/1024/LLGo 74.070 ns/op -0.53 ns/op / -0.7% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/128/Go 7.777 ns/op +0.019 ns/op / +0.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/128/LLGo 13.430 ns/op 0 ns/op / +0.0%
Windows MSVC 386 BenchmarkStringEquality/strings/equal/8/Go 6.338 ns/op +0.365 ns/op / +6.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/8/LLGo 3.731 ns/op -0.048 ns/op / -1.3% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/1024/Go 6.378 ns/op -0.013 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/1024/LLGo 3.236 ns/op +0.032 ns/op / +1.0% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/128/Go 6.335 ns/op -0.028 ns/op / -0.4% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/128/LLGo 3.203 ns/op -0.003 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/8/Go 5.588 ns/op +0.059 ns/op / +1.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/8/LLGo 3.202 ns/op -0.001 ns/op / -0.03122% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/last/1024/Go 23.160 ns/op -0.03 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/last/1024/LLGo 73.530 ns/op +0.3 ns/op / +0.4% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/128/Go 7.537 ns/op +0.009 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/128/LLGo 13.310 ns/op +0.07 ns/op / +0.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/8/Go 5.989 ns/op +0.134 ns/op / +2.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/8/LLGo 3.590 ns/op -0.962 ns/op / -21.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/1024/Go 31.230 ns/op -0.02 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/1024/LLGo 39.310 ns/op +0.54 ns/op / +1.4% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/128/Go 6.716 ns/op -0.004 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/128/LLGo 7.095 ns/op +0.091 ns/op / +1.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/8/Go 3.712 ns/op +0.002 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/8/LLGo 2.558 ns/op -0.169 ns/op / -6.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/1024/Go 4.757 ns/op +0.031 ns/op / +0.7% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/1024/LLGo 1.710 ns/op +0.082 ns/op / +5.0% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/128/Go 4.782 ns/op +0.041 ns/op / +0.9% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/128/LLGo 1.740 ns/op +0.1 ns/op / +6.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/8/Go 3.546 ns/op +0.137 ns/op / +4.0% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/8/LLGo 1.674 ns/op +0.057 ns/op / +3.5% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/1024/Go 31.240 ns/op +0.21 ns/op / +0.7% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/1024/LLGo 38.810 ns/op -0.15 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/128/Go 6.711 ns/op -0.035 ns/op / -0.5% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/128/LLGo 6.745 ns/op -0.006 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/8/Go 3.544 ns/op +0.188 ns/op / +5.6% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/8/LLGo 2.221 ns/op -0.031 ns/op / -1.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/1024/Go 27.400 ns/op -0.05 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/1024/LLGo 36.050 ns/op +0.21 ns/op / +0.6% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/128/Go 6.067 ns/op -0.027 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/128/LLGo 5.845 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/8/Go 3.877 ns/op +0.004 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/8/LLGo 2.551 ns/op +0.104 ns/op / +4.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/1024/Go 4.533 ns/op +0.015 ns/op / +0.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/1024/LLGo 1.569 ns/op -0.175 ns/op / -10.0% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/128/Go 4.497 ns/op -0.052 ns/op / -1.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/128/LLGo 1.590 ns/op -0.155 ns/op / -8.9% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/8/Go 3.856 ns/op -0.012 ns/op / -0.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/8/LLGo 1.621 ns/op -0.111 ns/op / -6.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/1024/Go 27.090 ns/op -0.04 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/1024/LLGo 35.610 ns/op -0.09 ns/op / -0.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/128/Go 5.906 ns/op -0.015 ns/op / -0.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/128/LLGo 5.482 ns/op -0.014 ns/op / -0.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/8/Go 3.866 ns/op -0.006 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/8/LLGo 2.171 ns/op -0.016 ns/op / -0.7% (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.251 s -930.8 ms / -42.7% (better) 1.441 ms -459.7 us / -24.2% (better)
Linux cprintf-lto 8240 B 0 B / +0.0% 368 B 0 B / +0.0% 1.220 s -404.6 ms / -24.9% (better) 1.360 ms -648.7 us / -32.3% (better)
Linux fmtprintf 1943880 B +120 B / +0.006174% (worse) 269976 B 0 B / +0.0% 7.931 s -1.411 s / -15.1% (better) 3.517 ms -51.74 us / -1.5% (better)
Linux fmtprintf-lto 1019880 B +8 B / +0.0007844% (worse) 210891 B 0 B / +0.0% 17.866 s -2.704 s / -13.1% (better) 3.237 ms -1.767 ms / -35.3% (better)
Linux println 260568 B -88 B / -0.03376% (better) 19172 B 0 B / +0.0% 1.319 s -504.9 ms / -27.7% (better) 1.838 ms -162.5 us / -8.1% (better)
Linux println-lto 102688 B +8 B / +0.007791% (worse) 15652 B 0 B / +0.0% 2.013 s -660.8 ms / -24.7% (better) 1.824 ms -128.6 us / -6.6% (better)
macOS cprintf 50944 B 0 B / +0.0% 4409 B 0 B / +0.0% 1.066 s -237 ms / -18.2% (better) 3.399 ms -586.8 us / -14.7% (better)
macOS cprintf-lto 50608 B 0 B / +0.0% 161 B 0 B / +0.0% 1.147 s -12.68 ms / -1.1% (better) 3.733 ms +1.015 ms / +37.3% (worse)
macOS fmtprintf 1233696 B 0 B / +0.0% 676157 B +64 B / +0.009466% (worse) 4.162 s -424.7 ms / -9.3% (better) 4.933 ms +131 us / +2.7% (worse)
macOS fmtprintf-lto 871600 B 0 B / +0.0% 521821 B +32 B / +0.006133% (worse) 6.321 s -1.554 s / -19.7% (better) 4.432 ms -141.7 us / -3.1% (better)
macOS println 100592 B 0 B / +0.0% 26375 B 0 B / +0.0% 945.571 ms -167.7 ms / -15.1% (better) 4.471 ms +1.049 ms / +30.7% (worse)
macOS println-lto 85632 B 0 B / +0.0% 22491 B 0 B / +0.0% 1.179 s -206 ms / -14.9% (better) 3.967 ms -890.3 us / -18.3% (better)
Windows MinGW cprintf 746496 B +512 B / +0.1% (worse) 4230 B 0 B / +0.0% 1.609 s -56.47 ms / -3.4% (better) 3.329 ms +583.7 us / +21.3% (worse)
Windows MinGW cprintf-lto 60928 B 0 B / +0.0% 4182 B 0 B / +0.0% 1.636 s -88.95 ms / -5.2% (better) 2.754 ms -31.4 us / -1.1% (better)
Windows MinGW fmtprintf 5157376 B +512 B / +0.009929% (worse) 362134 B 0 B / +0.0% 5.640 s +68.61 ms / +1.2% (worse) 7.998 ms +234.6 us / +3.0% (worse)
Windows MinGW fmtprintf-lto 2764288 B 0 B / +0.0% 308102 B 0 B / +0.0% 9.188 s +144 ms / +1.6% (worse) 8.550 ms +902.1 us / +11.8% (worse)
Windows MinGW println 808960 B +1024 B / +0.1% (worse) 27414 B 0 B / +0.0% 1.609 s -86.66 ms / -5.1% (better) 5.171 ms -281.5 us / -5.2% (better)
Windows MinGW println-lto 233984 B 0 B / +0.0% 22598 B 0 B / +0.0% 1.867 s -25.56 ms / -1.4% (better) 5.617 ms +540.5 us / +10.6% (worse)
Windows MinGW 386 cprintf 752640 B +512 B / +0.1% (worse) 22726 B 0 B / +0.0% 2.116 s +31.66 ms / +1.5% (worse) 9.152 ms +109 us / +1.2% (worse)
Windows MinGW 386 cprintf-lto 282112 B 0 B / +0.0% 19504 B 0 B / +0.0% 2.448 s +104.9 ms / +4.5% (worse) 9.443 ms +842.8 us / +9.8% (worse)
Windows MinGW 386 fmtprintf 4507648 B 0 B / +0.0% 284864 B 0 B / +0.0% 6.977 s -45.7 ms / -0.7% (better) 11.378 ms -925.4 us / -7.5% (better)
Windows MinGW 386 fmtprintf-lto 2890752 B 0 B / +0.0% 257486 B 0 B / +0.0% 11.280 s -554.3 ms / -4.7% (better) 10.983 ms -937.3 us / -7.9% (better)
Windows MinGW 386 println 751616 B +512 B / +0.1% (worse) 22672 B 0 B / +0.0% 2.095 s +24.19 ms / +1.2% (worse) 9.295 ms +375.7 us / +4.2% (worse)
Windows MinGW 386 println-lto 281088 B 0 B / +0.0% 19438 B 0 B / +0.0% 2.325 s -49.8 ms / -2.1% (better) 8.573 ms -396.6 us / -4.4% (better)
Windows MinGW ARM64 cprintf 752128 B +512 B / +0.1% (worse) 4028 B 0 B / +0.0% 2.306 s -12.33 ms / -0.5% (better) 8.064 ms +1.058 ms / +15.1% (worse)
Windows MinGW ARM64 cprintf-lto 60416 B 0 B / +0.0% 3984 B 0 B / +0.0% 2.471 s +108.1 ms / +4.6% (worse) 8.525 ms +1.253 ms / +17.2% (worse)
Windows MinGW ARM64 fmtprintf 5096960 B +512 B / +0.01005% (worse) 302168 B 0 B / +0.0% 7.242 s +425.3 ms / +6.2% (worse) 16.846 ms -1.372 ms / -7.5% (better)
Windows MinGW ARM64 fmtprintf-lto 2818048 B 0 B / +0.0% 258276 B -8 B / -0.003097% (better) 10.819 s -592.1 ms / -5.2% (better) 16.006 ms -1.432 ms / -8.2% (better)
Windows MinGW ARM64 println 813056 B 0 B / +0.0% 25604 B 0 B / +0.0% 2.438 s +116.1 ms / +5.0% (worse) 13.169 ms +531.2 us / +4.2% (worse)
Windows MinGW ARM64 println-lto 237056 B 0 B / +0.0% 21824 B 0 B / +0.0% 2.758 s +187.2 ms / +7.3% (worse) 13.361 ms +1.412 ms / +11.8% (worse)
Windows MSVC cprintf 991232 B +512 B / +0.1% (worse) 66003 B 0 B / +0.0% 1.906 s -232.4 ms / -10.9% (better) 3.900 ms -92.4 us / -2.3% (better)
Windows MSVC cprintf-lto 308736 B 0 B / +0.0% 65971 B 0 B / +0.0% 1.960 s -5.071 ms / -0.3% (better) 4.028 ms +65 us / +1.6% (worse)
Windows MSVC fmtprintf 5456384 B +512 B / +0.009384% (worse) 458230 B 0 B / +0.0% 6.564 s -142.4 ms / -2.1% (better) 13.855 ms +1.417 ms / +11.4% (worse)
Windows MSVC fmtprintf-lto 3087872 B 0 B / +0.0% 406662 B 0 B / +0.0% 10.576 s -187.3 ms / -1.7% (better) 12.568 ms -471 us / -3.6% (better)
Windows MSVC println 1123328 B +1024 B / +0.1% (worse) 123574 B 0 B / +0.0% 1.917 s -18.27 ms / -0.9% (better) 8.046 ms -334.2 us / -4.0% (better)
Windows MSVC println-lto 553984 B 0 B / +0.0% 119414 B 0 B / +0.0% 2.193 s -38.25 ms / -1.7% (better) 7.986 ms -722.8 us / -8.3% (better)
Windows MSVC 386 cprintf 661504 B 0 B / +0.0% 21378 B 0 B / +0.0% 1.521 s +36.49 ms / +2.5% (worse) 7.200 ms +123.3 us / +1.7% (worse)
Windows MSVC 386 cprintf-lto 221184 B 0 B / +0.0% 18857 B 0 B / +0.0% 1.722 s +5.41 ms / +0.3% (worse) 7.323 ms -391.4 us / -5.1% (better)
Windows MSVC 386 fmtprintf 4235776 B +512 B / +0.01209% (worse) 268326 B 0 B / +0.0% 5.290 s +175.3 ms / +3.4% (worse) 9.866 ms -231.2 us / -2.3% (better)
Windows MSVC 386 fmtprintf-lto 2704384 B 0 B / +0.0% 236961 B 0 B / +0.0% 8.267 s +71.42 ms / +0.9% (worse) 9.771 ms -381.9 us / -3.8% (better)
Windows MSVC 386 println 659456 B +1024 B / +0.2% (worse) 21308 B 0 B / +0.0% 1.500 s -8.644 ms / -0.6% (better) 7.115 ms -234.9 us / -3.2% (better)
Windows MSVC 386 println-lto 219648 B 0 B / +0.0% 18787 B 0 B / +0.0% 1.702 s +25.15 ms / +1.5% (worse) 8.035 ms +709.5 us / +9.7% (worse)
Windows MSVC ARM64 cprintf 754688 B 0 B / +0.0% 4240 B 0 B / +0.0% 2.144 s +93.92 ms / +4.6% (worse) 7.720 ms +406.3 us / +5.6% (worse)
Windows MSVC ARM64 cprintf-lto 66048 B 0 B / +0.0% 4140 B 0 B / +0.0% 2.131 s +31.28 ms / +1.5% (worse) 7.219 ms -170.4 us / -2.3% (better)
Windows MSVC ARM64 fmtprintf 5092864 B +512 B / +0.01005% (worse) 302492 B 0 B / +0.0% 6.597 s +86.53 ms / +1.3% (worse) 17.102 ms +205.9 us / +1.2% (worse)
Windows MSVC ARM64 fmtprintf-lto 2826752 B 0 B / +0.0% 259216 B -16 B / -0.006172% (better) 10.135 s +140.9 ms / +1.4% (worse) 18.071 ms +880.1 us / +5.1% (worse)
Windows MSVC ARM64 println 815616 B 0 B / +0.0% 26084 B 0 B / +0.0% 2.119 s +31.66 ms / +1.5% (worse) 13.577 ms -47.2 us / -0.3% (better)
Windows MSVC ARM64 println-lto 243200 B 0 B / +0.0% 22384 B 0 B / +0.0% 2.378 s +78.24 ms / +3.4% (worse) 13.986 ms +2.241 ms / +19.1% (worse)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 14.880 ns/op -4.99 ns/op / -25.1% (better)
Linux BenchmarkMergeCompilerFlags 195.400 ns/op -21.4 ns/op / -9.9% (better)
Linux BenchmarkMergeLinkerFlags 128.600 ns/op -29.2 ns/op / -18.5% (better)
Linux BenchmarkChannelBuffered 72.910 ns/op -8.95 ns/op / -10.9% (better)
Linux BenchmarkChannelHandoff 14275 ns/op -2755 ns/op / -16.2% (better)
Linux BenchmarkDefer 15.760 ns/op -7.83 ns/op / -33.2% (better)
Linux BenchmarkDirectCall 1.170 ns/op -0.388 ns/op / -24.9% (better)
Linux BenchmarkGlobalRead 1.171 ns/op -0.019 ns/op / -1.6% (better)
Linux BenchmarkGlobalWrite 7.848 ns/op +0.043 ns/op / +0.6% (worse)
Linux BenchmarkGoroutine 24004 ns/op -2289 ns/op / -8.7% (better)
Linux BenchmarkInterfaceCall 4.748 ns/op -0.451 ns/op / -8.7% (better)
Linux BenchmarkRuntimeGetG 2.408 ns/op -0.16 ns/op / -6.2% (better)
macOS BenchmarkLookupPCRandom 12.040 ns/op -7.91 ns/op / -39.6% (better)
macOS BenchmarkMergeCompilerFlags 98.630 ns/op -33.47 ns/op / -25.3% (better)
macOS BenchmarkMergeLinkerFlags 66.810 ns/op -32.81 ns/op / -32.9% (better)
macOS BenchmarkChannelBuffered 27.110 ns/op -5.17 ns/op / -16.0% (better)
macOS BenchmarkChannelHandoff 6700 ns/op -1108 ns/op / -14.2% (better)
macOS BenchmarkDefer 10.730 ns/op -1.89 ns/op / -15.0% (better)
macOS BenchmarkDirectCall 1.055 ns/op -0.038 ns/op / -3.5% (better)
macOS BenchmarkGlobalRead 1.054 ns/op -0.129 ns/op / -10.9% (better)
macOS BenchmarkGlobalWrite 1.039 ns/op -0.062 ns/op / -5.6% (better)
macOS BenchmarkGoroutine 77117 ns/op +12588 ns/op / +19.5% (worse)
macOS BenchmarkInterfaceCall 3.823 ns/op -0.187 ns/op / -4.7% (better)
macOS BenchmarkRuntimeGetG 2.101 ns/op -0.081 ns/op / -3.7% (better)
Windows MinGW BenchmarkLookupPCRandom 9.689 ns/op +0.023 ns/op / +0.2% (worse)
Windows MinGW BenchmarkMergeCompilerFlags 387 ns/op +11.7 ns/op / +3.1% (worse)
Windows MinGW BenchmarkMergeLinkerFlags 342.300 ns/op +6.5 ns/op / +1.9% (worse)
Windows MinGW BenchmarkChannelBuffered 26.640 ns/op -1.03 ns/op / -3.7% (better)
Windows MinGW BenchmarkChannelHandoff 525.500 ns/op -16.3 ns/op / -3.0% (better)
Windows MinGW BenchmarkDefer 12.400 ns/op -0.15 ns/op / -1.2% (better)
Windows MinGW BenchmarkDirectCall 1.358 ns/op +0.001 ns/op / +0.1% (worse)
Windows MinGW BenchmarkGlobalRead 1.357 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkGlobalWrite 2.165 ns/op -0.001 ns/op / -0.04617% (better)
Windows MinGW BenchmarkGoroutine 57386 ns/op -1740 ns/op / -2.9% (better)
Windows MinGW BenchmarkInterfaceCall 6.436 ns/op -0.85 ns/op / -11.7% (better)
Windows MinGW BenchmarkRuntimeGetG 1.629 ns/op +0.216 ns/op / +15.3% (worse)
Windows MinGW 386 BenchmarkLookupPCRandom 26.080 ns/op -0.41 ns/op / -1.5% (better)
Windows MinGW 386 BenchmarkMergeCompilerFlags 680.800 ns/op -45.4 ns/op / -6.3% (better)
Windows MinGW 386 BenchmarkMergeLinkerFlags 670 ns/op -10.4 ns/op / -1.5% (better)
Windows MinGW 386 BenchmarkChannelBuffered 44.940 ns/op -0.4 ns/op / -0.9% (better)
Windows MinGW 386 BenchmarkChannelHandoff 654.900 ns/op -22.3 ns/op / -3.3% (better)
Windows MinGW 386 BenchmarkDefer 17.240 ns/op -0.09 ns/op / -0.5% (better)
Windows MinGW 386 BenchmarkDirectCall 1.651 ns/op -0.016 ns/op / -1.0% (better)
Windows MinGW 386 BenchmarkGlobalRead 1.689 ns/op -0.019 ns/op / -1.1% (better)
Windows MinGW 386 BenchmarkGlobalWrite 8.578 ns/op -0.009 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkGoroutine 81575 ns/op -8951 ns/op / -9.9% (better)
Windows MinGW 386 BenchmarkInterfaceCall 7.939 ns/op -0.05 ns/op / -0.6% (better)
Windows MinGW 386 BenchmarkRuntimeGetG 1.958 ns/op -0.044 ns/op / -2.2% (better)
Windows MinGW ARM64 BenchmarkLookupPCRandom 12.010 ns/op -0.06 ns/op / -0.5% (better)
Windows MinGW ARM64 BenchmarkMergeCompilerFlags 568.200 ns/op -4.3 ns/op / -0.8% (better)
Windows MinGW ARM64 BenchmarkMergeLinkerFlags 534.500 ns/op -9.1 ns/op / -1.7% (better)
Windows MinGW ARM64 BenchmarkChannelBuffered 42.910 ns/op -0.11 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkChannelHandoff 1957 ns/op +55 ns/op / +2.9% (worse)
Windows MinGW ARM64 BenchmarkDefer 11.940 ns/op +0.14 ns/op / +1.2% (worse)
Windows MinGW ARM64 BenchmarkDirectCall 0.590 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 BenchmarkGlobalRead 0.663 ns/op +0.0001 ns/op / +0.01508% (worse)
Windows MinGW ARM64 BenchmarkGlobalWrite 0.663 ns/op -0.0001 ns/op / -0.01508% (better)
Windows MinGW ARM64 BenchmarkGoroutine 63298 ns/op -3138 ns/op / -4.7% (better)
Windows MinGW ARM64 BenchmarkInterfaceCall 3.864 ns/op +0.018 ns/op / +0.5% (worse)
Windows MinGW ARM64 BenchmarkRuntimeGetG 1.806 ns/op +0.036 ns/op / +2.0% (worse)
Windows MSVC BenchmarkLookupPCRandom 11.590 ns/op -0.1 ns/op / -0.9% (better)
Windows MSVC BenchmarkMergeCompilerFlags 572.600 ns/op -48.1 ns/op / -7.7% (better)
Windows MSVC BenchmarkMergeLinkerFlags 512.200 ns/op -12.6 ns/op / -2.4% (better)
Windows MSVC BenchmarkChannelBuffered 58.540 ns/op -0.02 ns/op / -0.03415% (better)
Windows MSVC BenchmarkChannelHandoff 2069 ns/op -16 ns/op / -0.8% (better)
Windows MSVC BenchmarkDefer 12.590 ns/op -0.94 ns/op / -6.9% (better)
Windows MSVC BenchmarkDirectCall 1.076 ns/op -0.029 ns/op / -2.6% (better)
Windows MSVC BenchmarkGlobalRead 1.337 ns/op -0.004 ns/op / -0.3% (better)
Windows MSVC BenchmarkGlobalWrite 8.494 ns/op -0.113 ns/op / -1.3% (better)
Windows MSVC BenchmarkGoroutine 75729 ns/op -1095 ns/op / -1.4% (better)
Windows MSVC BenchmarkInterfaceCall 5.705 ns/op -0.016 ns/op / -0.3% (better)
Windows MSVC BenchmarkRuntimeGetG 1.624 ns/op -0.014 ns/op / -0.9% (better)
Windows MSVC 386 BenchmarkLookupPCRandom 21.640 ns/op +0.08 ns/op / +0.4% (worse)
Windows MSVC 386 BenchmarkMergeCompilerFlags 573 ns/op +13.3 ns/op / +2.4% (worse)
Windows MSVC 386 BenchmarkMergeLinkerFlags 520.300 ns/op -5.9 ns/op / -1.1% (better)
Windows MSVC 386 BenchmarkChannelBuffered 36.780 ns/op +0.1 ns/op / +0.3% (worse)
Windows MSVC 386 BenchmarkChannelHandoff 751.900 ns/op +162.8 ns/op / +27.6% (worse)
Windows MSVC 386 BenchmarkDefer 14.100 ns/op -0.01 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkDirectCall 1.357 ns/op 0 ns/op / +0.0%
Windows MSVC 386 BenchmarkGlobalRead 1.630 ns/op -0.001 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkGlobalWrite 6.991 ns/op +0.002 ns/op / +0.02862% (worse)
Windows MSVC 386 BenchmarkGoroutine 72471 ns/op -251 ns/op / -0.3% (better)
Windows MSVC 386 BenchmarkInterfaceCall 6.518 ns/op -0.008 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkRuntimeGetG 1.904 ns/op +0.272 ns/op / +16.7% (worse)
Windows MSVC ARM64 BenchmarkLookupPCRandom 12.020 ns/op -0.06 ns/op / -0.5% (better)
Windows MSVC ARM64 BenchmarkMergeCompilerFlags 570.200 ns/op +0.3 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkMergeLinkerFlags 543.900 ns/op +3.4 ns/op / +0.6% (worse)
Windows MSVC ARM64 BenchmarkChannelBuffered 47.510 ns/op +0.09 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkChannelHandoff 1302 ns/op -64 ns/op / -4.7% (better)
Windows MSVC ARM64 BenchmarkDefer 11.950 ns/op +0.19 ns/op / +1.6% (worse)
Windows MSVC ARM64 BenchmarkDirectCall 0.590 ns/op +0.0005 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkGlobalRead 0.663 ns/op -0.0014 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkGlobalWrite 3.761 ns/op +0.002 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkGoroutine 62318 ns/op +2776 ns/op / +4.7% (worse)
Windows MSVC ARM64 BenchmarkInterfaceCall 3.853 ns/op -0.002 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkRuntimeGetG 1.800 ns/op +0.031 ns/op / +1.8% (worse)
Timer runtime benchmarks
Platform Operation and runtime ns/op vs base
Linux AfterFuncZeroDelivery/Go 912.300 ns/op -13.8 ns/op / -1.5% (better)
Linux AfterFuncZeroDelivery/LLGo 41065 ns/op -1933 ns/op / -4.5% (better)
Linux CreateStop/Go 307.100 ns/op -12.5 ns/op / -3.9% (better)
Linux CreateStop/LLGo 1457 ns/op -314 ns/op / -17.7% (better)
Linux RearmStopped/Go 115 ns/op -4.6 ns/op / -3.8% (better)
Linux RearmStopped/LLGo 1007 ns/op -80 ns/op / -7.4% (better)
Linux ResetActive/Go 70.900 ns/op +2.09 ns/op / +3.0% (worse)
Linux ResetActive/LLGo 820.600 ns/op +171.1 ns/op / +26.3% (worse)
Linux ResetHeap1024/Go 67.220 ns/op -1.01 ns/op / -1.5% (better)
Linux ResetHeap1024/LLGo 134.500 ns/op +0.1 ns/op / +0.1% (worse)
macOS AfterFuncZeroDelivery/Go 434.600 ns/op -63.6 ns/op / -12.8% (better)
macOS AfterFuncZeroDelivery/LLGo 57091 ns/op +809 ns/op / +1.4% (worse)
macOS CreateStop/Go 128.600 ns/op -49.1 ns/op / -27.6% (better)
macOS CreateStop/LLGo 361 ns/op -299 ns/op / -45.3% (better)
macOS RearmStopped/Go 55.440 ns/op -17.76 ns/op / -24.3% (better)
macOS RearmStopped/LLGo 230 ns/op -131.5 ns/op / -36.4% (better)
macOS ResetActive/Go 41.470 ns/op -8.65 ns/op / -17.3% (better)
macOS ResetActive/LLGo 128.900 ns/op +0.7 ns/op / +0.5% (worse)
macOS ResetHeap1024/Go 43.260 ns/op -11.68 ns/op / -21.3% (better)
macOS ResetHeap1024/LLGo 67.770 ns/op +0.25 ns/op / +0.4% (worse)
Windows MinGW AfterFuncZeroDelivery/Go 375.500 ns/op -3.7 ns/op / -1.0% (better)
Windows MinGW AfterFuncZeroDelivery/LLGo 110777 ns/op -1068 ns/op / -1.0% (better)
Windows MinGW CreateStop/Go 89.840 ns/op +0.48 ns/op / +0.5% (worse)
Windows MinGW CreateStop/LLGo 350 ns/op -8.3 ns/op / -2.3% (better)
Windows MinGW RearmStopped/Go 24.450 ns/op +0.02 ns/op / +0.1% (worse)
Windows MinGW RearmStopped/LLGo 192.200 ns/op -10.9 ns/op / -5.4% (better)
Windows MinGW ResetActive/Go 14.790 ns/op +0.01 ns/op / +0.1% (worse)
Windows MinGW ResetActive/LLGo 120.800 ns/op +1 ns/op / +0.8% (worse)
Windows MinGW ResetHeap1024/Go 14.870 ns/op -0.04 ns/op / -0.3% (better)
Windows MinGW ResetHeap1024/LLGo 88.640 ns/op +2.55 ns/op / +3.0% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/Go 945.400 ns/op -24.6 ns/op / -2.5% (better)
Windows MinGW 386 AfterFuncZeroDelivery/LLGo 154974 ns/op -523 ns/op / -0.3% (better)
Windows MinGW 386 CreateStop/Go 204.200 ns/op +0.4 ns/op / +0.2% (worse)
Windows MinGW 386 CreateStop/LLGo 434.400 ns/op -24.7 ns/op / -5.4% (better)
Windows MinGW 386 RearmStopped/Go 69.440 ns/op +0.25 ns/op / +0.4% (worse)
Windows MinGW 386 RearmStopped/LLGo 363.400 ns/op +34.3 ns/op / +10.4% (worse)
Windows MinGW 386 ResetActive/Go 39.780 ns/op -0.16 ns/op / -0.4% (better)
Windows MinGW 386 ResetActive/LLGo 972.500 ns/op -26.1 ns/op / -2.6% (better)
Windows MinGW 386 ResetHeap1024/Go 40.110 ns/op -0.37 ns/op / -0.9% (better)
Windows MinGW 386 ResetHeap1024/LLGo 146.400 ns/op -6.8 ns/op / -4.4% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/Go 665.900 ns/op +5.1 ns/op / +0.8% (worse)
Windows MinGW ARM64 AfterFuncZeroDelivery/LLGo 153386 ns/op -3885 ns/op / -2.5% (better)
Windows MinGW ARM64 CreateStop/Go 190.200 ns/op -6.2 ns/op / -3.2% (better)
Windows MinGW ARM64 CreateStop/LLGo 351.800 ns/op -1 ns/op / -0.3% (better)
Windows MinGW ARM64 RearmStopped/Go 70.580 ns/op +0.03 ns/op / +0.04252% (worse)
Windows MinGW ARM64 RearmStopped/LLGo 161.400 ns/op -7.3 ns/op / -4.3% (better)
Windows MinGW ARM64 ResetActive/Go 30.940 ns/op -0.2 ns/op / -0.6% (better)
Windows MinGW ARM64 ResetActive/LLGo 104.600 ns/op +17.52 ns/op / +20.1% (worse)
Windows MinGW ARM64 ResetHeap1024/Go 31.250 ns/op +0.12 ns/op / +0.4% (worse)
Windows MinGW ARM64 ResetHeap1024/LLGo 92.080 ns/op +0.22 ns/op / +0.2% (worse)
Windows MSVC AfterFuncZeroDelivery/Go 706.200 ns/op -3.6 ns/op / -0.5% (better)
Windows MSVC AfterFuncZeroDelivery/LLGo 150695 ns/op -1845 ns/op / -1.2% (better)
Windows MSVC CreateStop/Go 191.400 ns/op -6.6 ns/op / -3.3% (better)
Windows MSVC CreateStop/LLGo 719.400 ns/op +63.7 ns/op / +9.7% (worse)
Windows MSVC RearmStopped/Go 71.030 ns/op -0.46 ns/op / -0.6% (better)
Windows MSVC RearmStopped/LLGo 260 ns/op +28.3 ns/op / +12.2% (worse)
Windows MSVC ResetActive/Go 31.370 ns/op -0.3 ns/op / -0.9% (better)
Windows MSVC ResetActive/LLGo 655.800 ns/op +407.2 ns/op / +163.8% (worse)
Windows MSVC ResetHeap1024/Go 31.780 ns/op -0.21 ns/op / -0.7% (better)
Windows MSVC ResetHeap1024/LLGo 103.600 ns/op -0.1 ns/op / -0.1% (better)
Windows MSVC 386 AfterFuncZeroDelivery/Go 768.700 ns/op -73.5 ns/op / -8.7% (better)
Windows MSVC 386 AfterFuncZeroDelivery/LLGo 133250 ns/op +1103 ns/op / +0.8% (worse)
Windows MSVC 386 CreateStop/Go 170.800 ns/op +3 ns/op / +1.8% (worse)
Windows MSVC 386 CreateStop/LLGo 343.600 ns/op -18.6 ns/op / -5.1% (better)
Windows MSVC 386 RearmStopped/Go 57.540 ns/op +0.65 ns/op / +1.1% (worse)
Windows MSVC 386 RearmStopped/LLGo 295.100 ns/op -83.4 ns/op / -22.0% (better)
Windows MSVC 386 ResetActive/Go 32.550 ns/op -0.02 ns/op / -0.1% (better)
Windows MSVC 386 ResetActive/LLGo 888.400 ns/op -21.1 ns/op / -2.3% (better)
Windows MSVC 386 ResetHeap1024/Go 32.770 ns/op -0.07 ns/op / -0.2% (better)
Windows MSVC 386 ResetHeap1024/LLGo 123.300 ns/op -0.9 ns/op / -0.7% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/Go 670.500 ns/op +5.1 ns/op / +0.8% (worse)
Windows MSVC ARM64 AfterFuncZeroDelivery/LLGo 146276 ns/op -5220 ns/op / -3.4% (better)
Windows MSVC ARM64 CreateStop/Go 203.300 ns/op +11.1 ns/op / +5.8% (worse)
Windows MSVC ARM64 CreateStop/LLGo 272 ns/op -27.5 ns/op / -9.2% (better)
Windows MSVC ARM64 RearmStopped/Go 70.650 ns/op +0.05 ns/op / +0.1% (worse)
Windows MSVC ARM64 RearmStopped/LLGo 163.100 ns/op +1.3 ns/op / +0.8% (worse)
Windows MSVC ARM64 ResetActive/Go 31.090 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 ResetActive/LLGo 91.010 ns/op +0.01 ns/op / +0.01099% (worse)
Windows MSVC ARM64 ResetHeap1024/Go 31.010 ns/op -0.11 ns/op / -0.4% (better)
Windows MSVC ARM64 ResetHeap1024/LLGo 93.610 ns/op +0.29 ns/op / +0.3% (worse)

Compared with 717fbe4429cb measured in the same runner job.

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

One non-blocking suggestion to strengthen the allocation-accounting regression coverage.

@cpunion
cpunion force-pushed the fix/2923-bdwgc-allocation-counters branch from dfd097d to af333c3 Compare November 11, 2026 01:32
@cpunion

cpunion commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

@fennoai Added the exact native allocation-event regression requested in review, in af333c3, and rebased onto current main. The isolated probe checks four allocation shapes with exactly 1,000 events, fails on the original base, and passes 10 fresh-process runs each for ordinary and full-LTO builds. Please re-review.

@fennoai

fennoai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

All previously-approved changes survived the rebase intact. The PR is complete and consistent.

I've verified the new commit af333c3 thoroughly. Since this is managed mode, I'll return my re-review as Markdown.


Re-review: PR #3043 — commit af333c3 ("test: check exact native allocation event counts") + rebase

I re-fetched at the rebased head (af333c3 on base e2cca2cb) and reviewed the new commit plus confirmed the three prior commits survived the rebase cleanly. The new exact-count integration probe is well-designed and its correctness holds up — this addresses the regression test I asked for. No findings; good to merge from my side.

Why the "exactly 1,000 events" assertion is sound (not flaky)

My earlier review flagged that incidental runtime allocations make an exact count fragile, which is why the unit test uses a lenient < 1000. This new probe earns the stronger == 1000 assertion through its design, which I verified:

  • Standalone process, no testing goroutines. internal/build/testdata/allocation_events/main.go is a plain main built and executed as a native binary, so there are no background testing/bench goroutines allocating into the same process-wide counter during the window. The code comment states exactly this, and it's the key to exactness.
  • ReadMemStats is non-allocating on the BDWGC path. I confirmed GetHeapUsageSafe/GetGCNo are direct C linknames that don't allocate Go memory, and MemProfileMallocs() is allocation-free (verified in the first round). So the two ReadMemStats calls bracketing the measured loop do not themselves advance Mallocs — the delta is purely the 1,000 allocate calls. The triple read (before/after/before) before the loop is harmless belt-and-suspenders that warms any one-time state before the real baseline.
  • Exactly one counted allocation per iteration. Each allocate is //go:noinline and stores into a package-global (bytesSink/pointerSink), forcing a genuine heap escape with no stack elision and no dead-code removal. make([]byte, n) and &node{} each lower to a single managed alloc → one recordMemProfileAlloc increment.
  • Concurrent GC can't perturb the delta. Mallocs is cumulative (only incremented, never decremented on collection), so a GC cycle landing inside the loop doesn't change after - before.
  • Four distinct shapes. 1, 1024, 65536 exercise small/medium/large slice classes; size==0 is overloaded to mean the pointer-bearing node path (a real allocation, distinct from the unit test's genuine zero-sized make). All four correctly expect exactly 1,000.

Harness and hygiene

  • The 10 fresh-process runs × {Off, Full} LTO loop matches your description and reuses the established internal/build integration pattern (NewDefaultConf(ModeBuild), Build(Invocation{...}), run the built binary), consistent with siblings like allthreads_linux_test.go and bounds_checks_test.go.
  • Properly gated: testing.Short() and non-{darwin,linux,windows} skip, LLGO_ROOT set to repo root, t.Context() for cancellation, temp-dir output with .exe on Windows.
  • go vet ./internal/build/ passes and gofmt -l is clean on both new files; t.Context() resolves on the go1.27 toolchain in use.

Rest of the PR after rebase

The three prior commits are intact and match the state I approved: Mallocs wired via MemProfileMallocs() with the honest "Frees/HeapObjects remain zero" comment; the memstats_llgo.go derivation removed; the nonmoving path's explicit HeapObjects = Mallocs - Frees; the BDWGC metrics test; the want >= 1000 message fix; and the CI priority: mirror-fallback helper.

Nothing else to flag. The full PR — native allocation-event reporting, honest metrics handling, the exact-count integration probe, and the CI resilience fix — is in good shape.

View task

@cpunion
cpunion merged commit 32a0f03 into xgo-dev:main Nov 12, 2026
122 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.

runtime: BDWGC allocation counters make AllocsPerRun report false zero

2 participants