Skip to content

compiler: keep map range iterators in typed stack storage - #3038

Closed
cpunion wants to merge 2 commits into
xgo-dev:mainfrom
cpunion:fix/3033-map-iterator-allocation
Closed

cpunion wants to merge 2 commits into
xgo-dev:mainfrom
cpunion:fix/3033-map-iterator-allocation

Conversation

@cpunion

@cpunion cpunion commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Map range initializes a zeroed, caller-owned iterator in a fixed entry-block stack slot, registering its pointer fields on explicit-root targets.

func count(m map[int]int) int {
    n := 0
    for range m { n++ }
    return n
}
// nil map, -O3 -lto=full: ~112 collector B/call -> 0 in all three rounds

The immutable deferred-capture case in #3033 is already allocation-free after #3021; this fixes the remaining iterator allocation.

Validation: six-target IR checks; Go and native LLGo (-O0 and -O3/full LTO, three repetitions); actual J32/J64 (-O2) and W32 (-O0) execution; SSA/escape tests and complete Testgo/Testrt/Testmeta compiler fixtures. Regressions cover repeated initialization, nested iteration, clear/grow and GC, including pointer-free overflow buckets.

J32/J64's full test/go package at -O0 hits Node's unicode.init local-count limit, also reproduced on unchanged main; those execution checks use -O2.

Fixes #3033.

@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: map range iterators in typed stack storage

This is a focused, well-executed change. It replaces the per-range heap iterator allocation (NewMapIter) with a single caller-owned, entry-block stack slot that is re-zeroed on each range entry and initialized in place by the new MapIterInit. I reviewed correctness, memory safety, GC-root behavior, performance, and documentation across ssa/datastruct.go, ssa/memory.go, the GC-root machinery, and runtime/internal/runtime/{z_map,map}.go.

No correctness, memory-safety, or security defects found. Specific points that hold up well:

  • Slot lifetime/reuse is correct. The alloca is hoisted to the entry block (one slot per Range instruction, no per-iteration stack growth), while the zeroing memset is emitted at the range-entry site, so the slot is cleared on every re-entry. The SSA test asserts the right slot/init counts (sum:1, nested:2, repeated:1).
  • Re-zeroing is load-bearing, not just defensive. mapiterinit early-returns for nil/empty maps leaving it.h/it.key/it.elem untouched, so pre-zeroing is what keeps MapIterNext from reading stale pointers across reuse — exactly what TestMapRangeRepeatedInitialization protects.
  • GC roots are preserved on explicit-root (wasm) targets. Alloc(..., false) registers the iterator's pointer fields via registerStackRoots, keeping the map and its (even pointer-free) overflow buckets live across GC during iteration.
  • Test coverage is targeted at the genuinely tricky cases this change introduces (reuse across nil/empty maps, nested iterators, and GC interaction / grow), rather than snapshotting incidental IR.

The two inline comments are minor documentation clarifications around implicit couplings; neither requires a logic change.

Minor, non-blocking follow-ups (no inline anchor):

  • ssa/datastruct.go:1034 — the slot type is derived as Elem(lastParamType(..., MapIterInit)), i.e. MapIterInit's last parameter stripped of its pointer. This is a deliberate coupling to the runtime signature, but it is non-obvious at the call site; a one-line note that this resolves to *llgoMapIter would save a cross-reference.
  • On explicit-root (wasm) targets the iterator slot is zeroed twice (once at the range-entry site, once in the entry-block initializeStackRoots). This is correctness-neutral and bounded (per Range, not per iteration), but may be worth a follow-up to elide the redundant entry-block zeroing when the object's own Alloc already emits a dominating zeroinit.

Comment thread runtime/internal/runtime/z_map.go Resolved
Comment thread ssa/datastruct.go Resolved
@codecov

codecov Bot commented Nov 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

LLGo baseline benchmarks

a884f831e375 | workflow run | long-term charts

String equality benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkStringEquality/bytes/equal/1024/Go 25.790 ns/op +0.02 ns/op / +0.1% (worse)
Linux BenchmarkStringEquality/bytes/equal/1024/LLGo 62.540 ns/op -0.02 ns/op / -0.03197% (better)
Linux BenchmarkStringEquality/bytes/equal/128/Go 8.380 ns/op +0.054 ns/op / +0.6% (worse)
Linux BenchmarkStringEquality/bytes/equal/128/LLGo 11.860 ns/op -0.04 ns/op / -0.3% (better)
Linux BenchmarkStringEquality/bytes/equal/8/Go 5.826 ns/op -0.003 ns/op / -0.1% (better)
Linux BenchmarkStringEquality/bytes/equal/8/LLGo 4.660 ns/op +0.373 ns/op / +8.7% (worse)
Linux BenchmarkStringEquality/bytes/first/1024/Go 6.610 ns/op -0.029 ns/op / -0.4% (better)
Linux BenchmarkStringEquality/bytes/first/1024/LLGo 3.114 ns/op +0.404 ns/op / +14.9% (worse)
Linux BenchmarkStringEquality/bytes/first/128/Go 6.620 ns/op -0.013 ns/op / -0.2% (better)
Linux BenchmarkStringEquality/bytes/first/128/LLGo 3.109 ns/op +0.392 ns/op / +14.4% (worse)
Linux BenchmarkStringEquality/bytes/first/8/Go 5.819 ns/op -0.001 ns/op / -0.01718% (better)
Linux BenchmarkStringEquality/bytes/first/8/LLGo 3.131 ns/op +0.408 ns/op / +15.0% (worse)
Linux BenchmarkStringEquality/bytes/last/1024/Go 26.210 ns/op +1.05 ns/op / +4.2% (worse)
Linux BenchmarkStringEquality/bytes/last/1024/LLGo 62.560 ns/op +0.05 ns/op / +0.1% (worse)
Linux BenchmarkStringEquality/bytes/last/128/Go 8.144 ns/op -0.018 ns/op / -0.2% (better)
Linux BenchmarkStringEquality/bytes/last/128/LLGo 11.890 ns/op -0.12 ns/op / -1.0% (better)
Linux BenchmarkStringEquality/bytes/last/8/Go 5.818 ns/op -0.016 ns/op / -0.3% (better)
Linux BenchmarkStringEquality/bytes/last/8/LLGo 3.914 ns/op +0.413 ns/op / +11.8% (worse)
Linux BenchmarkStringEquality/strings/equal/1024/Go 23.150 ns/op -0.04 ns/op / -0.2% (better)
Linux BenchmarkStringEquality/strings/equal/1024/LLGo 54.530 ns/op -0.22 ns/op / -0.4% (better)
Linux BenchmarkStringEquality/strings/equal/128/Go 8.198 ns/op +0.006 ns/op / +0.1% (worse)
Linux BenchmarkStringEquality/strings/equal/128/LLGo 11.100 ns/op -0.11 ns/op / -1.0% (better)
Linux BenchmarkStringEquality/strings/equal/8/Go 5.826 ns/op -0.01 ns/op / -0.2% (better)
Linux BenchmarkStringEquality/strings/equal/8/LLGo 4.280 ns/op +0.008 ns/op / +0.2% (worse)
Linux BenchmarkStringEquality/strings/first/1024/Go 6.591 ns/op -0.007 ns/op / -0.1% (better)
Linux BenchmarkStringEquality/strings/first/1024/LLGo 2.722 ns/op -0.772 ns/op / -22.1% (better)
Linux BenchmarkStringEquality/strings/first/128/Go 6.591 ns/op -0.004 ns/op / -0.1% (better)
Linux BenchmarkStringEquality/strings/first/128/LLGo 2.719 ns/op -0.784 ns/op / -22.4% (better)
Linux BenchmarkStringEquality/strings/first/8/Go 5.819 ns/op -0.01 ns/op / -0.2% (better)
Linux BenchmarkStringEquality/strings/first/8/LLGo 2.722 ns/op -3.209 ns/op / -54.1% (better)
Linux BenchmarkStringEquality/strings/last/1024/Go 22.600 ns/op -0.16 ns/op / -0.7% (better)
Linux BenchmarkStringEquality/strings/last/1024/LLGo 54.520 ns/op -0.23 ns/op / -0.4% (better)
Linux BenchmarkStringEquality/strings/last/128/Go 8.141 ns/op -0.005 ns/op / -0.1% (better)
Linux BenchmarkStringEquality/strings/last/128/LLGo 11.010 ns/op -0.05 ns/op / -0.5% (better)
Linux BenchmarkStringEquality/strings/last/8/Go 5.819 ns/op -0.009 ns/op / -0.2% (better)
Linux BenchmarkStringEquality/strings/last/8/LLGo 3.500 ns/op -0.783 ns/op / -18.3% (better)
macOS BenchmarkStringEquality/bytes/equal/1024/Go 25.590 ns/op -11.92 ns/op / -31.8% (better)
macOS BenchmarkStringEquality/bytes/equal/1024/LLGo 26.070 ns/op -4.31 ns/op / -14.2% (better)
macOS BenchmarkStringEquality/bytes/equal/128/Go 5.471 ns/op -2.572 ns/op / -32.0% (better)
macOS BenchmarkStringEquality/bytes/equal/128/LLGo 4.877 ns/op -0.492 ns/op / -9.2% (better)
macOS BenchmarkStringEquality/bytes/equal/8/Go 3.472 ns/op -0.964 ns/op / -21.7% (better)
macOS BenchmarkStringEquality/bytes/equal/8/LLGo 2.967 ns/op +0.047 ns/op / +1.6% (worse)
macOS BenchmarkStringEquality/bytes/first/1024/Go 3.683 ns/op -2.374 ns/op / -39.2% (better)
macOS BenchmarkStringEquality/bytes/first/1024/LLGo 1.933 ns/op -0.266 ns/op / -12.1% (better)
macOS BenchmarkStringEquality/bytes/first/128/Go 3.678 ns/op -4.284 ns/op / -53.8% (better)
macOS BenchmarkStringEquality/bytes/first/128/LLGo 1.882 ns/op +0.023 ns/op / +1.2% (worse)
macOS BenchmarkStringEquality/bytes/first/8/Go 3.399 ns/op -0.26 ns/op / -7.1% (better)
macOS BenchmarkStringEquality/bytes/first/8/LLGo 1.840 ns/op -0.284 ns/op / -13.4% (better)
macOS BenchmarkStringEquality/bytes/last/1024/Go 23.250 ns/op -21.33 ns/op / -47.8% (better)
macOS BenchmarkStringEquality/bytes/last/1024/LLGo 23.810 ns/op -5.16 ns/op / -17.8% (better)
macOS BenchmarkStringEquality/bytes/last/128/Go 4.897 ns/op -3.064 ns/op / -38.5% (better)
macOS BenchmarkStringEquality/bytes/last/128/LLGo 4.282 ns/op -0.258 ns/op / -5.7% (better)
macOS BenchmarkStringEquality/bytes/last/8/Go 3.468 ns/op -2.951 ns/op / -46.0% (better)
macOS BenchmarkStringEquality/bytes/last/8/LLGo 2.579 ns/op +0.003 ns/op / +0.1% (worse)
macOS BenchmarkStringEquality/strings/equal/1024/Go 22.940 ns/op -9.5 ns/op / -29.3% (better)
macOS BenchmarkStringEquality/strings/equal/1024/LLGo 25.810 ns/op -9 ns/op / -25.9% (better)
macOS BenchmarkStringEquality/strings/equal/128/Go 5.512 ns/op -1.85 ns/op / -25.1% (better)
macOS BenchmarkStringEquality/strings/equal/128/LLGo 4.871 ns/op -1.089 ns/op / -18.3% (better)
macOS BenchmarkStringEquality/strings/equal/8/Go 3.443 ns/op -3.018 ns/op / -46.7% (better)
macOS BenchmarkStringEquality/strings/equal/8/LLGo 2.942 ns/op -1.129 ns/op / -27.7% (better)
macOS BenchmarkStringEquality/strings/first/1024/Go 3.528 ns/op -2.718 ns/op / -43.5% (better)
macOS BenchmarkStringEquality/strings/first/1024/LLGo 1.923 ns/op -0.507 ns/op / -20.9% (better)
macOS BenchmarkStringEquality/strings/first/128/Go 3.873 ns/op -4.354 ns/op / -52.9% (better)
macOS BenchmarkStringEquality/strings/first/128/LLGo 1.870 ns/op +0.108 ns/op / +6.1% (worse)
macOS BenchmarkStringEquality/strings/first/8/Go 3.538 ns/op -0.165 ns/op / -4.5% (better)
macOS BenchmarkStringEquality/strings/first/8/LLGo 1.856 ns/op -0.043 ns/op / -2.3% (better)
macOS BenchmarkStringEquality/strings/last/1024/Go 23.590 ns/op -18.47 ns/op / -43.9% (better)
macOS BenchmarkStringEquality/strings/last/1024/LLGo 24.770 ns/op -6.98 ns/op / -22.0% (better)
macOS BenchmarkStringEquality/strings/last/128/Go 4.890 ns/op -3.733 ns/op / -43.3% (better)
macOS BenchmarkStringEquality/strings/last/128/LLGo 4.158 ns/op -0.041 ns/op / -1.0% (better)
macOS BenchmarkStringEquality/strings/last/8/Go 3.436 ns/op -3.468 ns/op / -50.2% (better)
macOS BenchmarkStringEquality/strings/last/8/LLGo 2.560 ns/op -0.171 ns/op / -6.3% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/1024/Go 16.940 ns/op -0.09 ns/op / -0.5% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/1024/LLGo 34.730 ns/op -0.07 ns/op / -0.2% (better)
Windows MinGW BenchmarkStringEquality/bytes/equal/128/Go 5.990 ns/op +0.035 ns/op / +0.6% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/128/LLGo 9.343 ns/op +0.012 ns/op / +0.1% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/8/Go 4.958 ns/op +0.08 ns/op / +1.6% (worse)
Windows MinGW BenchmarkStringEquality/bytes/equal/8/LLGo 3.556 ns/op +0.034 ns/op / +1.0% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/1024/Go 5.371 ns/op -0.318 ns/op / -5.6% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/1024/LLGo 3.318 ns/op +0.337 ns/op / +11.3% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/128/Go 5.741 ns/op +0.5 ns/op / +9.5% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/128/LLGo 3.249 ns/op +0.27 ns/op / +9.1% (worse)
Windows MinGW BenchmarkStringEquality/bytes/first/8/Go 5.688 ns/op -0.049 ns/op / -0.9% (better)
Windows MinGW BenchmarkStringEquality/bytes/first/8/LLGo 3.249 ns/op +0.266 ns/op / +8.9% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/1024/Go 16.250 ns/op -0.07 ns/op / -0.4% (better)
Windows MinGW BenchmarkStringEquality/bytes/last/1024/LLGo 34.450 ns/op +0.13 ns/op / +0.4% (worse)
Windows MinGW BenchmarkStringEquality/bytes/last/128/Go 5.203 ns/op -0.795 ns/op / -13.3% (better)
Windows MinGW BenchmarkStringEquality/bytes/last/128/LLGo 8.520 ns/op -0.023 ns/op / -0.3% (better)
Windows MinGW BenchmarkStringEquality/bytes/last/8/Go 4.642 ns/op -0.004 ns/op / -0.1% (better)
Windows MinGW BenchmarkStringEquality/bytes/last/8/LLGo 3.522 ns/op +0.27 ns/op / +8.3% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/1024/Go 15.250 ns/op -0.02 ns/op / -0.1% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/1024/LLGo 29.900 ns/op -0.2 ns/op / -0.7% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/128/Go 5.991 ns/op -0.24 ns/op / -3.9% (better)
Windows MinGW BenchmarkStringEquality/strings/equal/128/LLGo 6.079 ns/op +0.064 ns/op / +1.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/8/Go 5.275 ns/op +0.168 ns/op / +3.3% (worse)
Windows MinGW BenchmarkStringEquality/strings/equal/8/LLGo 2.436 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW BenchmarkStringEquality/strings/first/1024/Go 4.699 ns/op -0.231 ns/op / -4.7% (better)
Windows MinGW BenchmarkStringEquality/strings/first/1024/LLGo 1.624 ns/op -0.272 ns/op / -14.3% (better)
Windows MinGW BenchmarkStringEquality/strings/first/128/Go 4.690 ns/op -1.285 ns/op / -21.5% (better)
Windows MinGW BenchmarkStringEquality/strings/first/128/LLGo 1.625 ns/op -0.27 ns/op / -14.2% (better)
Windows MinGW BenchmarkStringEquality/strings/first/8/Go 4.676 ns/op -1.008 ns/op / -17.7% (better)
Windows MinGW BenchmarkStringEquality/strings/first/8/LLGo 1.625 ns/op -0.271 ns/op / -14.3% (better)
Windows MinGW BenchmarkStringEquality/strings/last/1024/Go 14.950 ns/op +0.08 ns/op / +0.5% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/1024/LLGo 30.110 ns/op -0.08 ns/op / -0.3% (better)
Windows MinGW BenchmarkStringEquality/strings/last/128/Go 5.279 ns/op +0.333 ns/op / +6.7% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/128/LLGo 6.324 ns/op +0.068 ns/op / +1.1% (worse)
Windows MinGW BenchmarkStringEquality/strings/last/8/Go 4.640 ns/op -0.248 ns/op / -5.1% (better)
Windows MinGW BenchmarkStringEquality/strings/last/8/LLGo 2.168 ns/op -0.271 ns/op / -11.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/1024/Go 26.590 ns/op 0 ns/op / +0.0%
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/1024/LLGo 32.320 ns/op +3.8 ns/op / +13.3% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/128/Go 8.252 ns/op -0.031 ns/op / -0.4% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/128/LLGo 6.510 ns/op -0.075 ns/op / -1.1% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/8/Go 6.062 ns/op +0.056 ns/op / +0.9% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/equal/8/LLGo 3.756 ns/op -0.006 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/1024/Go 6.726 ns/op -0.011 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/1024/LLGo 3.205 ns/op +0.012 ns/op / +0.4% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/128/Go 6.705 ns/op +0.051 ns/op / +0.8% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/128/LLGo 3.185 ns/op +0.016 ns/op / +0.5% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/8/Go 5.971 ns/op -0.339 ns/op / -5.4% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/first/8/LLGo 3.171 ns/op +0.003 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/1024/Go 25.910 ns/op -0.31 ns/op / -1.2% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/1024/LLGo 31.390 ns/op +3.14 ns/op / +11.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/128/Go 7.988 ns/op +0.016 ns/op / +0.2% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/128/LLGo 5.956 ns/op +0.072 ns/op / +1.2% (worse)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/8/Go 6.248 ns/op -0.353 ns/op / -5.3% (better)
Windows MinGW 386 BenchmarkStringEquality/bytes/last/8/LLGo 3.702 ns/op -0.027 ns/op / -0.7% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/1024/Go 23.660 ns/op -0.15 ns/op / -0.6% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/1024/LLGo 33.350 ns/op +4.53 ns/op / +15.7% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/128/Go 7.688 ns/op +0.01 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/128/LLGo 6.376 ns/op +0.126 ns/op / +2.0% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/8/Go 6.155 ns/op +0.211 ns/op / +3.5% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/equal/8/LLGo 3.698 ns/op +0.02 ns/op / +0.5% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/1024/Go 6.370 ns/op +0.035 ns/op / +0.6% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/1024/LLGo 3.162 ns/op +0.007 ns/op / +0.2% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/128/Go 6.808 ns/op +0.415 ns/op / +6.5% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/128/LLGo 3.170 ns/op +0.012 ns/op / +0.4% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/first/8/Go 5.459 ns/op -0.003 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/first/8/LLGo 3.159 ns/op -0.03 ns/op / -0.9% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/1024/Go 23.040 ns/op -0.29 ns/op / -1.2% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/1024/LLGo 28.230 ns/op +0.02 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/last/128/Go 7.498 ns/op -0.007 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/128/LLGo 5.812 ns/op +0.043 ns/op / +0.7% (worse)
Windows MinGW 386 BenchmarkStringEquality/strings/last/8/Go 5.852 ns/op -0.191 ns/op / -3.2% (better)
Windows MinGW 386 BenchmarkStringEquality/strings/last/8/LLGo 3.733 ns/op +0.041 ns/op / +1.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/1024/Go 31.340 ns/op -0.15 ns/op / -0.5% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/1024/LLGo 38.220 ns/op -0.6 ns/op / -1.5% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/128/Go 6.704 ns/op +0.01 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/128/LLGo 7.033 ns/op +0.024 ns/op / +0.3% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/8/Go 3.735 ns/op +0.009 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/equal/8/LLGo 2.877 ns/op +0.167 ns/op / +6.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/1024/Go 4.727 ns/op -0.003 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/1024/LLGo 1.735 ns/op +0.092 ns/op / +5.6% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/128/Go 4.771 ns/op -0.037 ns/op / -0.8% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/128/LLGo 1.722 ns/op +0.103 ns/op / +6.4% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/8/Go 3.459 ns/op -0.092 ns/op / -2.6% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/first/8/LLGo 1.701 ns/op +0.097 ns/op / +6.0% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/1024/Go 32.200 ns/op +1.24 ns/op / +4.0% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/1024/LLGo 38.790 ns/op -0.13 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/128/Go 6.649 ns/op -0.067 ns/op / -1.0% (better)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/128/LLGo 6.769 ns/op +0.008 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/8/Go 3.552 ns/op +0.163 ns/op / +4.8% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/bytes/last/8/LLGo 2.459 ns/op +0.199 ns/op / +8.8% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/1024/Go 27.450 ns/op -0.05 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/1024/LLGo 36.440 ns/op +0.61 ns/op / +1.7% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/128/Go 6.058 ns/op -0.047 ns/op / -0.8% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/128/LLGo 5.864 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/8/Go 3.974 ns/op +0.011 ns/op / +0.3% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/equal/8/LLGo 2.949 ns/op +0.489 ns/op / +19.9% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/1024/Go 4.526 ns/op +0.015 ns/op / +0.3% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/1024/LLGo 1.727 ns/op +0.007 ns/op / +0.4% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/128/Go 4.562 ns/op -0.124 ns/op / -2.6% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/128/LLGo 1.708 ns/op -0.025 ns/op / -1.4% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/8/Go 3.942 ns/op +0.008 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/first/8/LLGo 1.738 ns/op +0.017 ns/op / +1.0% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/1024/Go 27.160 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/1024/LLGo 35.480 ns/op +0.07 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/128/Go 5.923 ns/op -0.005 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/128/LLGo 5.468 ns/op -0.003 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/8/Go 3.880 ns/op -0.009 ns/op / -0.2% (better)
Windows MinGW ARM64 BenchmarkStringEquality/strings/last/8/LLGo 2.278 ns/op +0.07 ns/op / +3.2% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/1024/Go 20.180 ns/op -0.13 ns/op / -0.6% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/1024/LLGo 41.120 ns/op -0.01 ns/op / -0.02431% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/128/Go 7.617 ns/op +0.087 ns/op / +1.2% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/128/LLGo 11.640 ns/op +0.05 ns/op / +0.4% (worse)
Windows MSVC BenchmarkStringEquality/bytes/equal/8/Go 5.883 ns/op -2.025 ns/op / -25.6% (better)
Windows MSVC BenchmarkStringEquality/bytes/equal/8/LLGo 5.054 ns/op +0.634 ns/op / +14.3% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/1024/Go 6.029 ns/op +0.113 ns/op / +1.9% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/1024/LLGo 3.752 ns/op +0.663 ns/op / +21.5% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/128/Go 5.932 ns/op -0.004 ns/op / -0.1% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/128/LLGo 3.710 ns/op +0.594 ns/op / +19.1% (worse)
Windows MSVC BenchmarkStringEquality/bytes/first/8/Go 5.886 ns/op -0.038 ns/op / -0.6% (better)
Windows MSVC BenchmarkStringEquality/bytes/first/8/LLGo 3.789 ns/op +0.682 ns/op / +22.0% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/1024/Go 19.390 ns/op -0.21 ns/op / -1.1% (better)
Windows MSVC BenchmarkStringEquality/bytes/last/1024/LLGo 42.910 ns/op +2.09 ns/op / +5.1% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/128/Go 6.620 ns/op +0.021 ns/op / +0.3% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/128/LLGo 11.780 ns/op +0.03 ns/op / +0.3% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/8/Go 5.948 ns/op +0.023 ns/op / +0.4% (worse)
Windows MSVC BenchmarkStringEquality/bytes/last/8/LLGo 4.351 ns/op +0.642 ns/op / +17.3% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/1024/Go 20.110 ns/op -0.06 ns/op / -0.3% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/1024/LLGo 37.460 ns/op +0.13 ns/op / +0.3% (worse)
Windows MSVC BenchmarkStringEquality/strings/equal/128/Go 7.453 ns/op -0.076 ns/op / -1.0% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/128/LLGo 6.936 ns/op -0.017 ns/op / -0.2% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/8/Go 6.217 ns/op -0.163 ns/op / -2.6% (better)
Windows MSVC BenchmarkStringEquality/strings/equal/8/LLGo 3.756 ns/op -0.045 ns/op / -1.2% (better)
Windows MSVC BenchmarkStringEquality/strings/first/1024/Go 5.953 ns/op +0.009 ns/op / +0.2% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/1024/LLGo 2.469 ns/op +0.002 ns/op / +0.1% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/128/Go 6.913 ns/op +0.856 ns/op / +14.1% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/128/LLGo 2.470 ns/op -0.067 ns/op / -2.6% (better)
Windows MSVC BenchmarkStringEquality/strings/first/8/Go 6.849 ns/op +0.838 ns/op / +13.9% (worse)
Windows MSVC BenchmarkStringEquality/strings/first/8/LLGo 2.506 ns/op +0.038 ns/op / +1.5% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/1024/Go 19.720 ns/op +0.23 ns/op / +1.2% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/1024/LLGo 37.130 ns/op +0.48 ns/op / +1.3% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/128/Go 6.646 ns/op -0.078 ns/op / -1.2% (better)
Windows MSVC BenchmarkStringEquality/strings/last/128/LLGo 6.793 ns/op +0.161 ns/op / +2.4% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/8/Go 6.856 ns/op +0.81 ns/op / +13.4% (worse)
Windows MSVC BenchmarkStringEquality/strings/last/8/LLGo 3.132 ns/op +0.017 ns/op / +0.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/1024/Go 30.900 ns/op -0.18 ns/op / -0.6% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/1024/LLGo 84.250 ns/op -2.63 ns/op / -3.0% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/128/Go 9.934 ns/op +0.051 ns/op / +0.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/128/LLGo 17.090 ns/op +0.19 ns/op / +1.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/8/Go 7.423 ns/op +0.105 ns/op / +1.4% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/equal/8/LLGo 5.067 ns/op +0.129 ns/op / +2.6% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/1024/Go 8.109 ns/op +0.091 ns/op / +1.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/1024/LLGo 3.712 ns/op -0.024 ns/op / -0.6% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/128/Go 7.979 ns/op -0.136 ns/op / -1.7% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/128/LLGo 3.724 ns/op -0.028 ns/op / -0.7% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/8/Go 6.939 ns/op -0.08 ns/op / -1.1% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/first/8/LLGo 3.875 ns/op +0.003 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/1024/Go 30.190 ns/op -0.09 ns/op / -0.3% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/1024/LLGo 84.490 ns/op -2.41 ns/op / -2.8% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/128/Go 9.480 ns/op -0.009 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/128/LLGo 15.730 ns/op -0.31 ns/op / -1.9% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/8/Go 7.510 ns/op -0.147 ns/op / -1.9% (better)
Windows MSVC 386 BenchmarkStringEquality/bytes/last/8/LLGo 4.385 ns/op -0.267 ns/op / -5.7% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/1024/Go 28.870 ns/op +0.13 ns/op / +0.5% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/1024/LLGo 95.450 ns/op +0.83 ns/op / +0.9% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/128/Go 9.505 ns/op +0.073 ns/op / +0.8% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/128/LLGo 16.820 ns/op +0.13 ns/op / +0.8% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/8/Go 7.766 ns/op +0.602 ns/op / +8.4% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/equal/8/LLGo 5.211 ns/op +0.482 ns/op / +10.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/1024/Go 7.776 ns/op +0.028 ns/op / +0.4% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/1024/LLGo 3.669 ns/op -0.087 ns/op / -2.3% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/128/Go 7.799 ns/op -0.002 ns/op / -0.02564% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/first/128/LLGo 3.765 ns/op +0.069 ns/op / +1.9% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/8/Go 6.877 ns/op +0.081 ns/op / +1.2% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/first/8/LLGo 3.759 ns/op -0.281 ns/op / -7.0% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/last/1024/Go 28.070 ns/op -0.31 ns/op / -1.1% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/last/1024/LLGo 94.880 ns/op +0.99 ns/op / +1.1% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/128/Go 8.989 ns/op -0.185 ns/op / -2.0% (better)
Windows MSVC 386 BenchmarkStringEquality/strings/last/128/LLGo 16.370 ns/op +0.26 ns/op / +1.6% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/8/Go 7.167 ns/op +0.018 ns/op / +0.3% (worse)
Windows MSVC 386 BenchmarkStringEquality/strings/last/8/LLGo 4.628 ns/op +0.084 ns/op / +1.8% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/1024/Go 31.600 ns/op +0.27 ns/op / +0.9% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/1024/LLGo 39.330 ns/op +0.21 ns/op / +0.5% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/128/Go 6.755 ns/op -0.319 ns/op / -4.5% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/128/LLGo 7.142 ns/op +0.092 ns/op / +1.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/8/Go 3.746 ns/op +0.034 ns/op / +0.9% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/equal/8/LLGo 2.556 ns/op -0.138 ns/op / -5.1% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/1024/Go 4.830 ns/op +0.094 ns/op / +2.0% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/1024/LLGo 1.763 ns/op +0.054 ns/op / +3.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/128/Go 4.754 ns/op +0.011 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/128/LLGo 1.592 ns/op -0.124 ns/op / -7.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/8/Go 3.444 ns/op -0.099 ns/op / -2.8% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/first/8/LLGo 1.542 ns/op -0.133 ns/op / -7.9% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/1024/Go 31.530 ns/op +0.28 ns/op / +0.9% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/1024/LLGo 39.360 ns/op +0.51 ns/op / +1.3% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/128/Go 6.646 ns/op -0.015 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/128/LLGo 6.735 ns/op +0.015 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/8/Go 3.407 ns/op +0.06 ns/op / +1.8% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/bytes/last/8/LLGo 2.090 ns/op -0.265 ns/op / -11.3% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/1024/Go 27.500 ns/op +0.11 ns/op / +0.4% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/1024/LLGo 35.760 ns/op -0.27 ns/op / -0.7% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/128/Go 6.075 ns/op -0.01 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/128/LLGo 5.851 ns/op -0.07 ns/op / -1.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/8/Go 3.991 ns/op +0.125 ns/op / +3.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/equal/8/LLGo 2.326 ns/op -0.342 ns/op / -12.8% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/1024/Go 4.520 ns/op -0.021 ns/op / -0.5% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/1024/LLGo 1.621 ns/op -0.004 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/128/Go 4.537 ns/op +0.008 ns/op / +0.2% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/128/LLGo 1.607 ns/op +0.046 ns/op / +2.9% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/8/Go 3.882 ns/op +0.024 ns/op / +0.6% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/first/8/LLGo 1.620 ns/op +0.048 ns/op / +3.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/1024/Go 27.150 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/1024/LLGo 35.440 ns/op -0.15 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/128/Go 5.916 ns/op +0.007 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/128/LLGo 5.410 ns/op -0.057 ns/op / -1.0% (better)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/8/Go 3.870 ns/op +0.005 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkStringEquality/strings/last/8/LLGo 2.180 ns/op -0.057 ns/op / -2.5% (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.064 s +8.124 ms / +0.8% (worse) 1.236 ms -46.78 us / -3.6% (better)
Linux cprintf-lto 8240 B 0 B / +0.0% 368 B 0 B / +0.0% 1.061 s -74.98 ms / -6.6% (better) 1.302 ms -173.6 us / -11.8% (better)
Linux fmtprintf 1942376 B +200 B / +0.0103% (worse) 269892 B 0 B / +0.0% 6.653 s -426.5 ms / -6.0% (better) 3.272 ms -140.9 us / -4.1% (better)
Linux fmtprintf-lto 1019232 B +72 B / +0.007065% (worse) 210809 B 0 B / +0.0% 15.696 s -691.4 ms / -4.2% (better) 3.092 ms -27.35 us / -0.9% (better)
Linux println 260256 B -16 B / -0.006147% (better) 19172 B 0 B / +0.0% 1.118 s +10.38 ms / +0.9% (worse) 1.622 ms -210.7 us / -11.5% (better)
Linux println-lto 102640 B -16 B / -0.01559% (better) 15652 B 0 B / +0.0% 1.815 s -52.19 ms / -2.8% (better) 1.595 ms -140.7 us / -8.1% (better)
macOS cprintf 50944 B 0 B / +0.0% 4409 B 0 B / +0.0% 1.411 s +268.5 ms / +23.5% (worse) 6.011 ms +2.671 ms / +80.0% (worse)
macOS cprintf-lto 50608 B 0 B / +0.0% 161 B 0 B / +0.0% 1.335 s +3.297 ms / +0.2% (worse) 3.599 ms -1.627 ms / -31.1% (better)
macOS fmtprintf 1233680 B -16 B / -0.001297% (better) 675837 B 0 B / +0.0% 6.081 s -797.5 ms / -11.6% (better) 9.875 ms +2.903 ms / +41.6% (worse)
macOS fmtprintf-lto 871600 B 0 B / +0.0% 521669 B 0 B / +0.0% 9.182 s -397.6 ms / -4.2% (better) 5.136 ms -620.4 us / -10.8% (better)
macOS println 100592 B 0 B / +0.0% 26391 B 0 B / +0.0% 1.450 s -24.91 ms / -1.7% (better) 5.431 ms -673.2 us / -11.0% (better)
macOS println-lto 85632 B 0 B / +0.0% 22491 B 0 B / +0.0% 1.624 s -350.1 ms / -17.7% (better) 4.785 ms +647.1 us / +15.6% (worse)
Windows MinGW cprintf 745472 B +512 B / +0.1% (worse) 4230 B 0 B / +0.0% 1.601 s -5.422 ms / -0.3% (better) 2.814 ms +69.6 us / +2.5% (worse)
Windows MinGW cprintf-lto 55808 B 0 B / +0.0% 4182 B 0 B / +0.0% 1.621 s +4.917 ms / +0.3% (worse) 2.836 ms +91.8 us / +3.3% (worse)
Windows MinGW fmtprintf 5144576 B +512 B / +0.009953% (worse) 362022 B 0 B / +0.0% 5.556 s -173.2 ms / -3.0% (better) 8.137 ms +255.5 us / +3.2% (worse)
Windows MinGW fmtprintf-lto 2761216 B 0 B / +0.0% 308038 B 0 B / +0.0% 9.242 s +345.9 ms / +3.9% (worse) 7.546 ms -109.7 us / -1.4% (better)
Windows MinGW println 806912 B 0 B / +0.0% 27414 B 0 B / +0.0% 1.600 s -107.5 ms / -6.3% (better) 5.321 ms -262 us / -4.7% (better)
Windows MinGW println-lto 233984 B 0 B / +0.0% 22598 B 0 B / +0.0% 1.862 s -50.22 ms / -2.6% (better) 5.224 ms -731.7 us / -12.3% (better)
Windows MinGW 386 cprintf 751104 B -512 B / -0.1% (better) 22726 B 0 B / +0.0% 1.548 s -20.86 ms / -1.3% (better) 6.777 ms -34.8 us / -0.5% (better)
Windows MinGW 386 cprintf-lto 282112 B 0 B / +0.0% 19504 B 0 B / +0.0% 1.758 s -69.15 ms / -3.8% (better) 6.675 ms -136.5 us / -2.0% (better)
Windows MinGW 386 fmtprintf 4497408 B 0 B / +0.0% 284736 B 0 B / +0.0% 5.253 s -213.6 ms / -3.9% (better) 8.965 ms -471.6 us / -5.0% (better)
Windows MinGW 386 fmtprintf-lto 2888192 B 0 B / +0.0% 257334 B 0 B / +0.0% 8.680 s -155.1 ms / -1.8% (better) 9.061 ms -92.4 us / -1.0% (better)
Windows MinGW 386 println 750080 B 0 B / +0.0% 22672 B 0 B / +0.0% 1.525 s -26.37 ms / -1.7% (better) 6.643 ms -212.8 us / -3.1% (better)
Windows MinGW 386 println-lto 280576 B 0 B / +0.0% 19438 B 0 B / +0.0% 1.814 s +13.64 ms / +0.8% (worse) 6.719 ms -50.2 us / -0.7% (better)
Windows MinGW ARM64 cprintf 750592 B 0 B / +0.0% 4028 B 0 B / +0.0% 2.267 s +41.02 ms / +1.8% (worse) 6.910 ms +559.9 us / +8.8% (worse)
Windows MinGW ARM64 cprintf-lto 55296 B 0 B / +0.0% 3984 B 0 B / +0.0% 2.298 s +18.6 ms / +0.8% (worse) 7.091 ms +441.6 us / +6.6% (worse)
Windows MinGW ARM64 fmtprintf 5084160 B +512 B / +0.01007% (worse) 302092 B 0 B / +0.0% 6.771 s -62 ms / -0.9% (better) 14.785 ms +190.9 us / +1.3% (worse)
Windows MinGW ARM64 fmtprintf-lto 2816512 B 0 B / +0.0% 258272 B 0 B / +0.0% 10.551 s +153.5 ms / +1.5% (worse) 15.571 ms +779.2 us / +5.3% (worse)
Windows MinGW ARM64 println 810496 B 0 B / +0.0% 25604 B 0 B / +0.0% 2.277 s +38.82 ms / +1.7% (worse) 11.107 ms -84.9 us / -0.8% (better)
Windows MinGW ARM64 println-lto 236544 B 0 B / +0.0% 21824 B 0 B / +0.0% 2.558 s +2.96 ms / +0.1% (worse) 11.984 ms -386.2 us / -3.1% (better)
Windows MSVC cprintf 989184 B 0 B / +0.0% 66003 B 0 B / +0.0% 1.964 s +31.12 ms / +1.6% (worse) 4.155 ms +22.2 us / +0.5% (worse)
Windows MSVC cprintf-lto 303616 B 0 B / +0.0% 65971 B 0 B / +0.0% 1.950 s -28.77 ms / -1.5% (better) 3.355 ms -55.2 us / -1.6% (better)
Windows MSVC fmtprintf 5443584 B -512 B / -0.009405% (better) 458118 B 0 B / +0.0% 6.504 s -28.35 ms / -0.4% (better) 14.590 ms +3.866 ms / +36.0% (worse)
Windows MSVC fmtprintf-lto 3085312 B 0 B / +0.0% 406598 B 0 B / +0.0% 10.306 s -1.857 ms / -0.01802% (better) 11.466 ms +271.1 us / +2.4% (worse)
Windows MSVC println 1121280 B -512 B / -0.04564% (better) 123574 B 0 B / +0.0% 1.921 s -20.45 ms / -1.1% (better) 7.317 ms -75.9 us / -1.0% (better)
Windows MSVC println-lto 553984 B 0 B / +0.0% 119414 B 0 B / +0.0% 2.198 s -11.41 ms / -0.5% (better) 7.090 ms -266.4 us / -3.6% (better)
Windows MSVC 386 cprintf 659968 B 0 B / +0.0% 21378 B 0 B / +0.0% 1.943 s +7.551 ms / +0.4% (worse) 9.362 ms -6.26 ms / -40.1% (better)
Windows MSVC 386 cprintf-lto 221184 B 0 B / +0.0% 18857 B 0 B / +0.0% 2.218 s -39.16 ms / -1.7% (better) 8.924 ms -881.7 us / -9.0% (better)
Windows MSVC 386 fmtprintf 4224000 B 0 B / +0.0% 268214 B 0 B / +0.0% 6.487 s -8.136 ms / -0.1% (better) 12.134 ms -478.4 us / -3.8% (better)
Windows MSVC 386 fmtprintf-lto 2701824 B 0 B / +0.0% 236785 B 0 B / +0.0% 10.117 s -140.4 ms / -1.4% (better) 12.854 ms -518.2 us / -3.9% (better)
Windows MSVC 386 println 657408 B 0 B / +0.0% 21308 B 0 B / +0.0% 1.905 s -54.6 ms / -2.8% (better) 9.680 ms +173.4 us / +1.8% (worse)
Windows MSVC 386 println-lto 219648 B 0 B / +0.0% 18787 B 0 B / +0.0% 2.137 s -77.23 ms / -3.5% (better) 9.473 ms -685.8 us / -6.8% (better)
Windows MSVC ARM64 cprintf 752640 B -512 B / -0.1% (better) 4240 B 0 B / +0.0% 2.060 s -83.91 ms / -3.9% (better) 7.617 ms -564.6 us / -6.9% (better)
Windows MSVC ARM64 cprintf-lto 60928 B 0 B / +0.0% 4140 B 0 B / +0.0% 2.077 s -112.7 ms / -5.1% (better) 7.710 ms -375.6 us / -4.6% (better)
Windows MSVC ARM64 fmtprintf 5079552 B 0 B / +0.0% 302412 B 0 B / +0.0% 6.463 s -296.1 ms / -4.4% (better) 16.650 ms -1.246 ms / -7.0% (better)
Windows MSVC ARM64 fmtprintf-lto 2825216 B 0 B / +0.0% 259216 B 0 B / +0.0% 9.965 s -367.7 ms / -3.6% (better) 17.264 ms -985.4 us / -5.4% (better)
Windows MSVC ARM64 println 813056 B 0 B / +0.0% 26084 B 0 B / +0.0% 2.073 s -68.81 ms / -3.2% (better) 13.538 ms -1.313 ms / -8.8% (better)
Windows MSVC ARM64 println-lto 242688 B 0 B / +0.0% 22384 B 0 B / +0.0% 2.308 s -106.2 ms / -4.4% (better) 13.330 ms -1.047 ms / -7.3% (better)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 14.670 ns/op -0.1 ns/op / -0.7% (better)
Linux BenchmarkMergeCompilerFlags 195.500 ns/op +3.4 ns/op / +1.8% (worse)
Linux BenchmarkMergeLinkerFlags 137.500 ns/op +10.4 ns/op / +8.2% (worse)
Linux BenchmarkChannelBuffered 72.060 ns/op -0.61 ns/op / -0.8% (better)
Linux BenchmarkChannelHandoff 13060 ns/op -678 ns/op / -4.9% (better)
Linux BenchmarkDefer 16.260 ns/op -0.75 ns/op / -4.4% (better)
Linux BenchmarkDirectCall 1.187 ns/op +0.018 ns/op / +1.5% (worse)
Linux BenchmarkGlobalRead 1.165 ns/op -0.399 ns/op / -25.5% (better)
Linux BenchmarkGlobalWrite 7.815 ns/op +0.036 ns/op / +0.5% (worse)
Linux BenchmarkGoroutine 22656 ns/op -188 ns/op / -0.8% (better)
Linux BenchmarkInterfaceCall 4.668 ns/op -0.777 ns/op / -14.3% (better)
Linux BenchmarkRuntimeGetG 2.355 ns/op -0.084 ns/op / -3.4% (better)
macOS BenchmarkLookupPCRandom 11.880 ns/op -7.57 ns/op / -38.9% (better)
macOS BenchmarkMergeCompilerFlags 87.870 ns/op -78.23 ns/op / -47.1% (better)
macOS BenchmarkMergeLinkerFlags 54.360 ns/op -61.44 ns/op / -53.1% (better)
macOS BenchmarkChannelBuffered 31.250 ns/op -7.57 ns/op / -19.5% (better)
macOS BenchmarkChannelHandoff 8261 ns/op -3056 ns/op / -27.0% (better)
macOS BenchmarkDefer 14.090 ns/op -0.42 ns/op / -2.9% (better)
macOS BenchmarkDirectCall 1.086 ns/op -0.198 ns/op / -15.4% (better)
macOS BenchmarkGlobalRead 1.078 ns/op -0.306 ns/op / -22.1% (better)
macOS BenchmarkGlobalWrite 1.074 ns/op -0.417 ns/op / -28.0% (better)
macOS BenchmarkGoroutine 47525 ns/op +7170 ns/op / +17.8% (worse)
macOS BenchmarkInterfaceCall 3.622 ns/op -0.911 ns/op / -20.1% (better)
macOS BenchmarkRuntimeGetG 2.528 ns/op -0.231 ns/op / -8.4% (better)
Windows MinGW BenchmarkLookupPCRandom 9.646 ns/op +0.053 ns/op / +0.6% (worse)
Windows MinGW BenchmarkMergeCompilerFlags 374.100 ns/op -22.6 ns/op / -5.7% (better)
Windows MinGW BenchmarkMergeLinkerFlags 358.700 ns/op -4 ns/op / -1.1% (better)
Windows MinGW BenchmarkChannelBuffered 27.040 ns/op +0.44 ns/op / +1.7% (worse)
Windows MinGW BenchmarkChannelHandoff 1045 ns/op +61 ns/op / +6.2% (worse)
Windows MinGW BenchmarkDefer 12.790 ns/op +0.32 ns/op / +2.6% (worse)
Windows MinGW BenchmarkDirectCall 1.628 ns/op +0.262 ns/op / +19.2% (worse)
Windows MinGW BenchmarkGlobalRead 1.357 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkGlobalWrite 2.166 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkGoroutine 59068 ns/op -1090 ns/op / -1.8% (better)
Windows MinGW BenchmarkInterfaceCall 5.758 ns/op -0.225 ns/op / -3.8% (better)
Windows MinGW BenchmarkRuntimeGetG 1.679 ns/op +0.048 ns/op / +2.9% (worse)
Windows MinGW 386 BenchmarkLookupPCRandom 21.560 ns/op -0.03 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkMergeCompilerFlags 559.900 ns/op +0.5 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkMergeLinkerFlags 516 ns/op -0.9 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkChannelBuffered 36.920 ns/op -0.24 ns/op / -0.6% (better)
Windows MinGW 386 BenchmarkChannelHandoff 781.600 ns/op -36 ns/op / -4.4% (better)
Windows MinGW 386 BenchmarkDefer 14.110 ns/op +0.02 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkDirectCall 1.358 ns/op +0.001 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkGlobalRead 1.571 ns/op +0.175 ns/op / +12.5% (worse)
Windows MinGW 386 BenchmarkGlobalWrite 6.983 ns/op +0.001 ns/op / +0.01432% (worse)
Windows MinGW 386 BenchmarkGoroutine 70134 ns/op -1053 ns/op / -1.5% (better)
Windows MinGW 386 BenchmarkInterfaceCall 6.518 ns/op -0.006 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkRuntimeGetG 1.629 ns/op -0.001 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkLookupPCRandom 12.120 ns/op +0.05 ns/op / +0.4% (worse)
Windows MinGW ARM64 BenchmarkMergeCompilerFlags 552.200 ns/op -3.8 ns/op / -0.7% (better)
Windows MinGW ARM64 BenchmarkMergeLinkerFlags 521.700 ns/op +5.8 ns/op / +1.1% (worse)
Windows MinGW ARM64 BenchmarkChannelBuffered 42.380 ns/op +0.86 ns/op / +2.1% (worse)
Windows MinGW ARM64 BenchmarkChannelHandoff 4467 ns/op +658 ns/op / +17.3% (worse)
Windows MinGW ARM64 BenchmarkDefer 12 ns/op +0.23 ns/op / +2.0% (worse)
Windows MinGW ARM64 BenchmarkDirectCall 0.590 ns/op -0.0739 ns/op / -11.1% (better)
Windows MinGW ARM64 BenchmarkGlobalRead 0.663 ns/op +0.0735 ns/op / +12.5% (worse)
Windows MinGW ARM64 BenchmarkGlobalWrite 0.664 ns/op -0.2203 ns/op / -24.9% (better)
Windows MinGW ARM64 BenchmarkGoroutine 63477 ns/op -44 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkInterfaceCall 3.883 ns/op +0.029 ns/op / +0.8% (worse)
Windows MinGW ARM64 BenchmarkRuntimeGetG 1.809 ns/op +0.009 ns/op / +0.5% (worse)
Windows MSVC BenchmarkLookupPCRandom 13 ns/op -0.25 ns/op / -1.9% (better)
Windows MSVC BenchmarkMergeCompilerFlags 606.900 ns/op -22.5 ns/op / -3.6% (better)
Windows MSVC BenchmarkMergeLinkerFlags 541.400 ns/op +6.1 ns/op / +1.1% (worse)
Windows MSVC BenchmarkChannelBuffered 46.880 ns/op +11.55 ns/op / +32.7% (worse)
Windows MSVC BenchmarkChannelHandoff 1307 ns/op +89 ns/op / +7.3% (worse)
Windows MSVC BenchmarkDefer 14.660 ns/op +0.05 ns/op / +0.3% (worse)
Windows MSVC BenchmarkDirectCall 1.859 ns/op +0.312 ns/op / +20.2% (worse)
Windows MSVC BenchmarkGlobalRead 1.547 ns/op -0.31 ns/op / -16.7% (better)
Windows MSVC BenchmarkGlobalWrite 2.470 ns/op +0.017 ns/op / +0.7% (worse)
Windows MSVC BenchmarkGoroutine 89920 ns/op +306 ns/op / +0.3% (worse)
Windows MSVC BenchmarkInterfaceCall 7.435 ns/op -0.008 ns/op / -0.1% (better)
Windows MSVC BenchmarkRuntimeGetG 2.169 ns/op 0 ns/op / +0.0%
Windows MSVC 386 BenchmarkLookupPCRandom 26.510 ns/op -0.18 ns/op / -0.7% (better)
Windows MSVC 386 BenchmarkMergeCompilerFlags 710 ns/op -35 ns/op / -4.7% (better)
Windows MSVC 386 BenchmarkMergeLinkerFlags 702.900 ns/op +4.4 ns/op / +0.6% (worse)
Windows MSVC 386 BenchmarkChannelBuffered 43.280 ns/op -0.61 ns/op / -1.4% (better)
Windows MSVC 386 BenchmarkChannelHandoff 1109 ns/op -58 ns/op / -5.0% (better)
Windows MSVC 386 BenchmarkDefer 14.910 ns/op +0.28 ns/op / +1.9% (worse)
Windows MSVC 386 BenchmarkDirectCall 1.550 ns/op -0.003 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkGlobalRead 1.552 ns/op -0.31 ns/op / -16.6% (better)
Windows MSVC 386 BenchmarkGlobalWrite 7.790 ns/op +0.006 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkGoroutine 111644 ns/op +2750 ns/op / +2.5% (worse)
Windows MSVC 386 BenchmarkInterfaceCall 7.430 ns/op -0.024 ns/op / -0.3% (better)
Windows MSVC 386 BenchmarkRuntimeGetG 2.484 ns/op +0.553 ns/op / +28.6% (worse)
Windows MSVC ARM64 BenchmarkLookupPCRandom 12.120 ns/op -0.01 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkMergeCompilerFlags 573 ns/op -4.4 ns/op / -0.8% (better)
Windows MSVC ARM64 BenchmarkMergeLinkerFlags 537.600 ns/op -13.5 ns/op / -2.4% (better)
Windows MSVC ARM64 BenchmarkChannelBuffered 45.410 ns/op -0.07 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkChannelHandoff 4409 ns/op +47 ns/op / +1.1% (worse)
Windows MSVC ARM64 BenchmarkDefer 11.750 ns/op +0.01 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkDirectCall 0.590 ns/op +0.0003 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkGlobalRead 0.663 ns/op -0.001 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkGlobalWrite 3.755 ns/op -0.003 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkGoroutine 59189 ns/op +1668 ns/op / +2.9% (worse)
Windows MSVC ARM64 BenchmarkInterfaceCall 3.853 ns/op -0.005 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkRuntimeGetG 1.769 ns/op -0.04 ns/op / -2.2% (better)
Timer runtime benchmarks
Platform Operation and runtime ns/op vs base
Linux AfterFuncZeroDelivery/Go 925.400 ns/op +6.8 ns/op / +0.7% (worse)
Linux AfterFuncZeroDelivery/LLGo 46032 ns/op +4829 ns/op / +11.7% (worse)
Linux CreateStop/Go 292.600 ns/op -2.2 ns/op / -0.7% (better)
Linux CreateStop/LLGo 1398 ns/op -29 ns/op / -2.0% (better)
Linux RearmStopped/Go 114.900 ns/op -1.3 ns/op / -1.1% (better)
Linux RearmStopped/LLGo 813.100 ns/op -114.4 ns/op / -12.3% (better)
Linux ResetActive/Go 67.430 ns/op -1.38 ns/op / -2.0% (better)
Linux ResetActive/LLGo 591.100 ns/op -418.9 ns/op / -41.5% (better)
Linux ResetHeap1024/Go 67.380 ns/op 0 ns/op / +0.0%
Linux ResetHeap1024/LLGo 134.200 ns/op +3.3 ns/op / +2.5% (worse)
macOS AfterFuncZeroDelivery/Go 367.700 ns/op -229.6 ns/op / -38.4% (better)
macOS AfterFuncZeroDelivery/LLGo 42263 ns/op -17384 ns/op / -29.1% (better)
macOS CreateStop/Go 158.200 ns/op -36.4 ns/op / -18.7% (better)
macOS CreateStop/LLGo 353.500 ns/op -256.2 ns/op / -42.0% (better)
macOS RearmStopped/Go 61.570 ns/op -27.48 ns/op / -30.9% (better)
macOS RearmStopped/LLGo 209.500 ns/op -150.2 ns/op / -41.8% (better)
macOS ResetActive/Go 43.930 ns/op -20.28 ns/op / -31.6% (better)
macOS ResetActive/LLGo 117.600 ns/op -28.6 ns/op / -19.6% (better)
macOS ResetHeap1024/Go 39.520 ns/op -28.41 ns/op / -41.8% (better)
macOS ResetHeap1024/LLGo 61.710 ns/op -13.26 ns/op / -17.7% (better)
Windows MinGW AfterFuncZeroDelivery/Go 381.400 ns/op +2.5 ns/op / +0.7% (worse)
Windows MinGW AfterFuncZeroDelivery/LLGo 113627 ns/op +1063 ns/op / +0.9% (worse)
Windows MinGW CreateStop/Go 90.250 ns/op -1.82 ns/op / -2.0% (better)
Windows MinGW CreateStop/LLGo 367.700 ns/op -12.4 ns/op / -3.3% (better)
Windows MinGW RearmStopped/Go 24.490 ns/op 0 ns/op / +0.0%
Windows MinGW RearmStopped/LLGo 170.900 ns/op -9.3 ns/op / -5.2% (better)
Windows MinGW ResetActive/Go 14.770 ns/op -0.02 ns/op / -0.1% (better)
Windows MinGW ResetActive/LLGo 133.900 ns/op +9.8 ns/op / +7.9% (worse)
Windows MinGW ResetHeap1024/Go 15.080 ns/op +0.15 ns/op / +1.0% (worse)
Windows MinGW ResetHeap1024/LLGo 86.330 ns/op +0.25 ns/op / +0.3% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/Go 770.900 ns/op +4.8 ns/op / +0.6% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/LLGo 131126 ns/op +929 ns/op / +0.7% (worse)
Windows MinGW 386 CreateStop/Go 171.900 ns/op +4.7 ns/op / +2.8% (worse)
Windows MinGW 386 CreateStop/LLGo 382.200 ns/op +44.4 ns/op / +13.1% (worse)
Windows MinGW 386 RearmStopped/Go 57.070 ns/op +0.36 ns/op / +0.6% (worse)
Windows MinGW 386 RearmStopped/LLGo 261.500 ns/op +6.6 ns/op / +2.6% (worse)
Windows MinGW 386 ResetActive/Go 32.610 ns/op +0.07 ns/op / +0.2% (worse)
Windows MinGW 386 ResetActive/LLGo 847.100 ns/op +18.6 ns/op / +2.2% (worse)
Windows MinGW 386 ResetHeap1024/Go 32.870 ns/op +0.04 ns/op / +0.1% (worse)
Windows MinGW 386 ResetHeap1024/LLGo 122.800 ns/op -2.2 ns/op / -1.8% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/Go 663.500 ns/op -10.8 ns/op / -1.6% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/LLGo 148117 ns/op -977 ns/op / -0.7% (better)
Windows MinGW ARM64 CreateStop/Go 199.200 ns/op -1.2 ns/op / -0.6% (better)
Windows MinGW ARM64 CreateStop/LLGo 297.600 ns/op -42.9 ns/op / -12.6% (better)
Windows MinGW ARM64 RearmStopped/Go 70.540 ns/op -0.05 ns/op / -0.1% (better)
Windows MinGW ARM64 RearmStopped/LLGo 162.800 ns/op -1.3 ns/op / -0.8% (better)
Windows MinGW ARM64 ResetActive/Go 31.010 ns/op -0.13 ns/op / -0.4% (better)
Windows MinGW ARM64 ResetActive/LLGo 93.170 ns/op -1.87 ns/op / -2.0% (better)
Windows MinGW ARM64 ResetHeap1024/Go 31.050 ns/op -0.05 ns/op / -0.2% (better)
Windows MinGW ARM64 ResetHeap1024/LLGo 91.920 ns/op -0.93 ns/op / -1.0% (better)
Windows MSVC AfterFuncZeroDelivery/Go 547.600 ns/op -17.5 ns/op / -3.1% (better)
Windows MSVC AfterFuncZeroDelivery/LLGo 178652 ns/op -2984 ns/op / -1.6% (better)
Windows MSVC CreateStop/Go 115.100 ns/op 0 ns/op / +0.0%
Windows MSVC CreateStop/LLGo 635 ns/op +25.9 ns/op / +4.3% (worse)
Windows MSVC RearmStopped/Go 31.690 ns/op +0.44 ns/op / +1.4% (worse)
Windows MSVC RearmStopped/LLGo 264.900 ns/op +15.3 ns/op / +6.1% (worse)
Windows MSVC ResetActive/Go 20.080 ns/op +0.05 ns/op / +0.2% (worse)
Windows MSVC ResetActive/LLGo 229.700 ns/op +27.3 ns/op / +13.5% (worse)
Windows MSVC ResetHeap1024/Go 20.470 ns/op +0.04 ns/op / +0.2% (worse)
Windows MSVC ResetHeap1024/LLGo 100.800 ns/op -1.4 ns/op / -1.4% (better)
Windows MSVC 386 AfterFuncZeroDelivery/Go 957.800 ns/op +7.1 ns/op / +0.7% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/LLGo 204522 ns/op -1691 ns/op / -0.8% (better)
Windows MSVC 386 CreateStop/Go 193 ns/op -2.1 ns/op / -1.1% (better)
Windows MSVC 386 CreateStop/LLGo 485.400 ns/op +66.9 ns/op / +16.0% (worse)
Windows MSVC 386 RearmStopped/Go 63.430 ns/op +0.08 ns/op / +0.1% (worse)
Windows MSVC 386 RearmStopped/LLGo 354.200 ns/op -102.3 ns/op / -22.4% (better)
Windows MSVC 386 ResetActive/Go 38.890 ns/op -0.17 ns/op / -0.4% (better)
Windows MSVC 386 ResetActive/LLGo 325 ns/op -641.7 ns/op / -66.4% (better)
Windows MSVC 386 ResetHeap1024/Go 39.580 ns/op +0.06 ns/op / +0.2% (worse)
Windows MSVC 386 ResetHeap1024/LLGo 140.100 ns/op -8.7 ns/op / -5.8% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/Go 665.100 ns/op -1.6 ns/op / -0.2% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/LLGo 146908 ns/op -2655 ns/op / -1.8% (better)
Windows MSVC ARM64 CreateStop/Go 199.100 ns/op +1.8 ns/op / +0.9% (worse)
Windows MSVC ARM64 CreateStop/LLGo 298.200 ns/op +25.6 ns/op / +9.4% (worse)
Windows MSVC ARM64 RearmStopped/Go 70.530 ns/op -0.07 ns/op / -0.1% (better)
Windows MSVC ARM64 RearmStopped/LLGo 163.400 ns/op -3.4 ns/op / -2.0% (better)
Windows MSVC ARM64 ResetActive/Go 31 ns/op -0.16 ns/op / -0.5% (better)
Windows MSVC ARM64 ResetActive/LLGo 96 ns/op +8.24 ns/op / +9.4% (worse)
Windows MSVC ARM64 ResetHeap1024/Go 31.200 ns/op +0.02 ns/op / +0.1% (worse)
Windows MSVC ARM64 ResetHeap1024/LLGo 94.410 ns/op +1.71 ns/op / +1.8% (worse)

Compared with 4a7f426484c9 measured in the same runner job.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

LLGo WebAssembly build benchmarks

a884f831e375 | 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 155941 B 0 B / +0.0% 88932 B 0 B / +0.0%
cprintf/j32-goos-js/LLGo 155024 B 0 B / +0.0% 72985 B 0 B / +0.0%
cprintf/j64-emscripten-memory64/LLGo 142573 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 1633534 B +197 B / +0.01206% (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 1691118 B +220 B / +0.01301% (worse) 89416 B 0 B / +0.0%
fmtprintf/j64-emscripten-memory64/LLGo 1514425 B +201 B / +0.01327% (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 1074741 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/w32-wasi/LLGo 1076028 B 0 B / +0.0% 0 B 0 B / 0.0%
j32-emscripten/LLGo 155131 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 154420 B 0 B / +0.0% 72985 B 0 B / +0.0%
j64-emscripten-memory64/LLGo 141774 B 0 B / +0.0% 92103 B 0 B / +0.0%
reflectcall/j32-emscripten/LLGo 1372719 B +2 B / +0.0001457% (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 1385627 B +2 B / +0.0001443% (worse) 79699 B 0 B / +0.0%
reflectcall/j64-emscripten-memory64/LLGo 1256989 B +10 B / +0.0007956% (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 1042035 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/w32-wasi/LLGo 1043191 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.325 s -800.1 ms / -8.8% (better)
j32-goos-js 8.185 s -253.9 ms / -3.0% (better)
j64-emscripten-memory64 7.399 s -314.9 ms / -4.1% (better)
reflectcall/w32-wasi 27.536 s -215.3 ms / -0.8% (better)
w32-goos-wasip1 4.123 s -199.2 ms / -4.6% (better)
w32-wasi 3.798 s -161 ms / -4.1% (better)

Compared with 4a7f426484c9 measured in the same runner job.

@cpunion cpunion closed this Nov 9, 2026
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.

perf: nil map iteration and immutable deferred captures still allocate after unified escape analysis

1 participant