Skip to content

fix: handle failures exposed by full GOROOT coverage - #2741

Merged
cpunion merged 5 commits into
xgo-dev:mainfrom
cpunion:codex/fix-restored-goroot-ci-20261006
Oct 6, 2026
Merged

cpunion merged 5 commits into
xgo-dev:mainfrom
cpunion:codex/fix-restored-goroot-ci-20261006

Conversation

@cpunion

@cpunion cpunion commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Fix failures exposed by restoring full daily coverage in llgo-compat/ci#37.

Case Cause Change
abi/f_ret_z_not.go LLVM 22 crashes while materializing empty aggregate debug values on ARM64. Give zero-sized debug snapshots byte storage; retain source type metadata and the existing value ABI.
rangegen.go, Windows 64-bit MinGW amd64 exceeded the 3-minute build limit; MSVC ARM64 exceeded the 4 GiB RSS guard. Keep the case enabled with a 10-minute budget on affected targets and a 1 GiB Go heap target on ARM64, retaining the 4 GiB guard. CI #37 serializes the selected heavy cases.
fixedbugs/issue39541.go, Windows amd64 One million concurrent reflect.MakeFunc calls exceeded the minute limit under CI load. Allow 2 minutes and isolate its CI shard from the paired compiler; keep output and exit checks.
Unix GOROOT resource sampling A slow ps query blocked process completion and deadline handling. Bound each query to one second and distinguish child completion before/after the deadline, retaining RSS monitoring.
fixedbugs/issue75764.go Checks gc's interface-wrapper tail-call optimization through a timing ratio, rather than language behavior. Classify this compiler-specific performance benchmark globally as not applicable; reports retain that count.

Validation: the ARM64 regression crashes before the change and passes after it for Darwin, Linux, Windows MSVC and MinGW at O0/O2/Os (12 object-emission checks). The original Go 1.27 GOROOT case, existing SSA/CL debug tests, all GOROOT runner unit tests, resource/deadline regression tests with the race detector, and git diff --check pass.

Targeted CI passed 6/6 jobs, covering the four cases against Go 1.26/1.27 on macOS ARM64, Windows MSVC amd64/386, and MinGW amd64/386/ARM64 (commit 1b0a2e0). The 2 GiB heap trial passed MinGW ARM64 but still reached the RSS guard on MSVC ARM64/Go 1.26. Final MSVC/MinGW ARM64 validation passed 2/2 jobs with the 1 GiB heap target and 4 GiB RSS guard retained (commit 5c4020c). Both Go versions pass; peak LLGo RSS is 3116 MiB on MSVC and 2825 MiB on MinGW, with builds taking 3m29s–3m37s. CI #37’s actual case-selection preflight correctly serializes both versions.

@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

The core fix in ssa/di.go is sound and well-reasoned: for empty/zero-sized aggregates it backs the debug-only address with a byte and stores a zero while keeping the true source type in the variable metadata, which correctly avoids the LLVM 22 SelectionDAGBuilder::resolveDanglingDebugInfo crash. The new cl/debug_zero_size_test.go exercises real object emission across targets and opt levels — the right call, since module verification alone doesn't reproduce the crash. The test/goroot YAML and unit-test additions are internally consistent (selectors, timeouts, and reason strings all match).

Verified across quality, performance, security, and documentation passes:

  • Performance: the added SizeOf is O(1) and off the hot path (debug builds only, once per variable); the 12-iteration test is test-only and reuses the SSA build.
  • Security: no type-confusion / over-read risk — a byte-sized alloca is larger than the zero-sized declared element, so every downstream access touches 0 bytes within the allocation.
  • Documentation: comments and YAML reason strings accurately describe the code.

One minor, non-blocking note left inline. No correctness regressions found.

Comment thread ssa/di.go
entryBuilder := *b
entryBuilder.impl = b.Func.entryAllocaBuilder()
dbgPtr = entryBuilder.AllocaT(ty)
store = b.Store(dbgPtr, storedValue)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor / non-blocking: the Store is now intentionally emitted while dbgPtr.Type is still Pointer(ty) (the alloca'd type), before it's reset to Pointer(v.Type). For most types where ty != v.Type (slice, string, named) this is benign — the same store is emitted. For signature/closure values it's a real emitted-IR change: Store now takes the closure branch and writes a full {funcptr, nil} aggregate, whereas the old order stored only the function pointer and left the $data slot as uninitialized stack garbage. This is actually an improvement (debug-only), but the surrounding comment only explains the zero-sized rationale. Consider a one-line note that the Store deliberately runs under the alloca type ty so closure-typed debug values are fully initialized.

@codecov

codecov Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

LLGo baseline benchmarks

5c4020c76e6b | workflow run | long-term charts

Program measurements

Platform Workload File size vs base Text size vs base Build vs base Run vs base
Linux cprintf 8568 B 0 B / +0.0% 387 B 0 B / +0.0% 1.214 s -216.3 ms / -15.1% (better) 1.355 ms -230.2 us / -14.5% (better)
Linux cprintf-lto 8408 B 0 B / +0.0% 368 B 0 B / +0.0% 1.177 s -240.3 ms / -17.0% (better) 1.382 ms -54.05 us / -3.8% (better)
Linux fmtprintf 4880680 B -264 B / -0.005409% (better) 501619 B 0 B / +0.0% 9.181 s -947 ms / -9.4% (better) 3.301 ms -77.81 us / -2.3% (better)
Linux fmtprintf-lto 3600808 B 0 B / +0.0% 438538 B 0 B / +0.0% 19.268 s -421 ms / -2.1% (better) 3.096 ms -57.75 us / -1.8% (better)
Linux println 674712 B -240 B / -0.03556% (better) 16855 B 0 B / +0.0% 1.154 s -222.4 ms / -16.2% (better) 1.784 ms -78.27 us / -4.2% (better)
Linux println-lto 190024 B 0 B / +0.0% 14273 B 0 B / +0.0% 1.381 s -303.2 ms / -18.0% (better) 1.721 ms +27.75 us / +1.6% (worse)
macOS cprintf 50736 B 0 B / +0.0% 4409 B 0 B / +0.0% 863.373 ms +62.39 ms / +7.8% (worse) 2.655 ms +179.2 us / +7.2% (worse)
macOS cprintf-lto 50496 B 0 B / +0.0% 161 B 0 B / +0.0% 873.139 ms +30.1 ms / +3.6% (worse) 2.522 ms +110.6 us / +4.6% (worse)
macOS fmtprintf 1773456 B 0 B / +0.0% 877780 B 0 B / +0.0% 4.519 s -124 ms / -2.7% (better) 8.608 ms -451.8 us / -5.0% (better)
macOS fmtprintf-lto 1360928 B 0 B / +0.0% 762428 B 0 B / +0.0% 9.355 s -744.1 ms / -7.4% (better) 4.102 ms +372 us / +10.0% (worse)
macOS println 99344 B 0 B / +0.0% 24216 B 0 B / +0.0% 885.642 ms +51.27 ms / +6.1% (worse) 3.401 ms -149.3 us / -4.2% (better)
macOS println-lto 83664 B 0 B / +0.0% 21457 B 0 B / +0.0% 1.031 s +8.327 ms / +0.8% (worse) 3.175 ms -500.3 us / -13.6% (better)
Windows MinGW cprintf 650752 B -512 B / -0.1% (better) 4550 B 0 B / +0.0% 1.909 s +121.5 ms / +6.8% (worse) 3.370 ms -1.28 ms / -27.5% (better)
Windows MinGW cprintf-lto 43520 B 0 B / +0.0% 4486 B 0 B / +0.0% 1.750 s -56.44 ms / -3.1% (better) 3.445 ms -163.9 us / -4.5% (better)
Windows MinGW fmtprintf 5432832 B 0 B / +0.0% 600310 B 0 B / +0.0% 7.685 s +130.8 ms / +1.7% (worse) 9.110 ms -13.2 us / -0.1% (better)
Windows MinGW fmtprintf-lto 4126720 B -512 B / -0.01241% (better) 546582 B 0 B / +0.0% 15.362 s +163 ms / +1.1% (worse) 8.439 ms +276.7 us / +3.4% (worse)
Windows MinGW println 706048 B -512 B / -0.1% (better) 25190 B 0 B / +0.0% 1.744 s -32.13 ms / -1.8% (better) 6.720 ms -553.7 us / -7.6% (better)
Windows MinGW println-lto 208896 B 0 B / +0.0% 22054 B 0 B / +0.0% 2.028 s -52.63 ms / -2.5% (better) 6.745 ms -279.4 us / -4.0% (better)
Windows MinGW 386 cprintf 601600 B 0 B / +0.0% 5326 B 0 B / +0.0% 1.693 s +50.62 ms / +3.1% (worse) 5.576 ms +465.9 us / +9.1% (worse)
Windows MinGW 386 cprintf-lto 103424 B 0 B / +0.0% 5094 B 0 B / +0.0% 1.733 s +29.44 ms / +1.7% (worse) 5.384 ms +219.2 us / +4.2% (worse)
Windows MinGW 386 fmtprintf 4744704 B -512 B / -0.01079% (better) 472478 B 0 B / +0.0% 7.496 s -5.077 ms / -0.1% (better) 10.354 ms +21 us / +0.2% (worse)
Windows MinGW 386 fmtprintf-lto 4148736 B 0 B / +0.0% 451114 B 0 B / +0.0% 14.709 s +180.7 ms / +1.2% (worse) 10.495 ms -487.9 us / -4.4% (better)
Windows MinGW 386 println 653312 B 0 B / +0.0% 21490 B 0 B / +0.0% 1.709 s -56.85 ms / -3.2% (better) 8.532 ms -526 us / -5.8% (better)
Windows MinGW 386 println-lto 258560 B 0 B / +0.0% 19306 B 0 B / +0.0% 1.970 s -21.47 ms / -1.1% (better) 8.706 ms +200 ns / +0.002297% (worse)
Windows MinGW ARM64 cprintf 660992 B -512 B / -0.1% (better) 4408 B 0 B / +0.0% 1.983 s +110.6 ms / +5.9% (worse) 6.422 ms +257.2 us / +4.2% (worse)
Windows MinGW ARM64 cprintf-lto 43520 B 0 B / +0.0% 4340 B 0 B / +0.0% 2.002 s +104.6 ms / +5.5% (worse) 6.729 ms +726.8 us / +12.1% (worse)
Windows MinGW ARM64 fmtprintf 5343232 B -512 B / -0.009581% (better) 510876 B 0 B / +0.0% 7.212 s -110.9 ms / -1.5% (better) 12.886 ms -207.8 us / -1.6% (better)
Windows MinGW ARM64 fmtprintf-lto 4302336 B 0 B / +0.0% 477264 B 0 B / +0.0% 13.822 s +108.7 ms / +0.8% (worse) 13.297 ms +1.428 ms / +12.0% (worse)
Windows MinGW ARM64 println 713728 B -512 B / -0.1% (better) 23884 B 0 B / +0.0% 1.928 s +12.48 ms / +0.7% (worse) 11.602 ms -80.5 us / -0.7% (better)
Windows MinGW ARM64 println-lto 215552 B 0 B / +0.0% 21232 B 0 B / +0.0% 2.181 s -45.65 ms / -2.1% (better) 11.091 ms -1.162 ms / -9.5% (better)
Windows MSVC cprintf 893440 B -512 B / -0.1% (better) 65798 B 0 B / +0.0% 1.677 s -102.1 ms / -5.7% (better) 3.419 ms -57.5 us / -1.7% (better)
Windows MSVC cprintf-lto 289792 B 0 B / +0.0% 65734 B 0 B / +0.0% 1.601 s -42.68 ms / -2.6% (better) 3.351 ms -7.9 us / -0.2% (better)
Windows MSVC fmtprintf 5732864 B 0 B / +0.0% 695862 B 0 B / +0.0% 7.168 s -110.9 ms / -1.5% (better) 10.029 ms +34.6 us / +0.3% (worse)
Windows MSVC fmtprintf-lto 4449792 B 0 B / +0.0% 646134 B 0 B / +0.0% 13.794 s -454.1 ms / -3.2% (better) 9.113 ms -514.3 us / -5.3% (better)
Windows MSVC println 1016832 B -512 B / -0.1% (better) 120854 B 0 B / +0.0% 1.617 s -230.4 ms / -12.5% (better) 7.353 ms -737.9 us / -9.1% (better)
Windows MSVC println-lto 528384 B 0 B / +0.0% 118390 B 0 B / +0.0% 1.850 s -26.38 ms / -1.4% (better) 7.013 ms +30.8 us / +0.4% (worse)
Windows MSVC 386 cprintf 513536 B 0 B / +0.0% 3931 B 0 B / +0.0% 1.558 s +18.58 ms / +1.2% (worse) 5.730 ms -166.7 us / -2.8% (better)
Windows MSVC 386 cprintf-lto 44032 B 0 B / +0.0% 3853 B 0 B / +0.0% 1.584 s -35.35 ms / -2.2% (better) 5.656 ms +196.2 us / +3.6% (worse)
Windows MSVC 386 fmtprintf 4479488 B 0 B / +0.0% 455868 B 0 B / +0.0% 7.363 s +187 ms / +2.6% (worse) 11.786 ms -48.5 us / -0.4% (better)
Windows MSVC 386 fmtprintf-lto 3899392 B 0 B / +0.0% 426651 B 0 B / +0.0% 13.725 s +129.9 ms / +1.0% (worse) 11.225 ms -38.1 us / -0.3% (better)
Windows MSVC 386 println 567296 B 0 B / +0.0% 20340 B 0 B / +0.0% 1.577 s +10.48 ms / +0.7% (worse) 9.723 ms -1.253 ms / -11.4% (better)
Windows MSVC 386 println-lto 199168 B 0 B / +0.0% 18501 B 0 B / +0.0% 2.009 s +230.8 ms / +13.0% (worse) 9.980 ms +216.2 us / +2.2% (worse)
Windows MSVC ARM64 cprintf 662528 B 0 B / +0.0% 4192 B 0 B / +0.0% 1.596 s +14.84 ms / +0.9% (worse) 6.766 ms +454.3 us / +7.2% (worse)
Windows MSVC ARM64 cprintf-lto 47616 B 0 B / +0.0% 4084 B 0 B / +0.0% 1.607 s -13.63 ms / -0.8% (better) 6.987 ms -79.2 us / -1.1% (better)
Windows MSVC ARM64 fmtprintf 5339136 B -512 B / -0.009589% (better) 510808 B 0 B / +0.0% 6.738 s +4.511 ms / +0.1% (worse) 14.428 ms +445.8 us / +3.2% (worse)
Windows MSVC ARM64 fmtprintf-lto 4309504 B 0 B / +0.0% 477924 B 0 B / +0.0% 12.883 s -107.1 ms / -0.8% (better) 14.484 ms +152.4 us / +1.1% (worse)
Windows MSVC ARM64 println 714752 B -512 B / -0.1% (better) 23908 B 0 B / +0.0% 1.612 s +19.73 ms / +1.2% (worse) 12.752 ms +1.496 ms / +13.3% (worse)
Windows MSVC ARM64 println-lto 220672 B 0 B / +0.0% 21380 B 0 B / +0.0% 1.833 s +21.41 ms / +1.2% (worse) 11.910 ms -382.1 us / -3.1% (better)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 14.690 ns/op -0.03 ns/op / -0.2% (better)
Linux BenchmarkMergeCompilerFlags 204.500 ns/op -10.9 ns/op / -5.1% (better)
Linux BenchmarkMergeLinkerFlags 135.400 ns/op -9.7 ns/op / -6.7% (better)
Linux BenchmarkChannelBuffered 55.750 ns/op +0.61 ns/op / +1.1% (worse)
Linux BenchmarkChannelHandoff 12678 ns/op -1926 ns/op / -13.2% (better)
Linux BenchmarkDefer 51.050 ns/op +2.17 ns/op / +4.4% (worse)
Linux BenchmarkDirectCall 1.168 ns/op +0.001 ns/op / +0.1% (worse)
Linux BenchmarkGlobalRead 1.166 ns/op -0.002 ns/op / -0.2% (better)
Linux BenchmarkGlobalWrite 7.761 ns/op +0.001 ns/op / +0.01289% (worse)
Linux BenchmarkGoroutine 26841 ns/op -6754 ns/op / -20.1% (better)
Linux BenchmarkInterfaceCall 5.839 ns/op -0.001 ns/op / -0.01712% (better)
Linux BenchmarkRuntimeGetG 3.020 ns/op +0.039 ns/op / +1.3% (worse)
macOS BenchmarkLookupPCRandom 12.520 ns/op +0.01 ns/op / +0.1% (worse)
macOS BenchmarkMergeCompilerFlags 106.900 ns/op +2 ns/op / +1.9% (worse)
macOS BenchmarkMergeLinkerFlags 68.560 ns/op +1.19 ns/op / +1.8% (worse)
macOS BenchmarkChannelBuffered 26.430 ns/op +0.97 ns/op / +3.8% (worse)
macOS BenchmarkChannelHandoff 8649 ns/op -521 ns/op / -5.7% (better)
macOS BenchmarkDefer 34.540 ns/op +1.42 ns/op / +4.3% (worse)
macOS BenchmarkDirectCall 1.082 ns/op -0.014 ns/op / -1.3% (better)
macOS BenchmarkGlobalRead 1.091 ns/op +0.012 ns/op / +1.1% (worse)
macOS BenchmarkGlobalWrite 1.078 ns/op -0.033 ns/op / -3.0% (better)
macOS BenchmarkGoroutine 39416 ns/op +2785 ns/op / +7.6% (worse)
macOS BenchmarkInterfaceCall 4.197 ns/op +0.285 ns/op / +7.3% (worse)
macOS BenchmarkRuntimeGetG 2.234 ns/op +0.105 ns/op / +4.9% (worse)
Windows MinGW BenchmarkLookupPCRandom 13.300 ns/op +0.14 ns/op / +1.1% (worse)
Windows MinGW BenchmarkMergeCompilerFlags 614.400 ns/op -10.3 ns/op / -1.6% (better)
Windows MinGW BenchmarkMergeLinkerFlags 559.700 ns/op -5.2 ns/op / -0.9% (better)
Windows MinGW BenchmarkChannelBuffered 30.330 ns/op -0.51 ns/op / -1.7% (better)
Windows MinGW BenchmarkChannelHandoff 947.100 ns/op +6.2 ns/op / +0.7% (worse)
Windows MinGW BenchmarkDefer 58.950 ns/op -0.05 ns/op / -0.1% (better)
Windows MinGW BenchmarkDirectCall 1.566 ns/op +0.019 ns/op / +1.2% (worse)
Windows MinGW BenchmarkGlobalRead 1.567 ns/op +0.018 ns/op / +1.2% (worse)
Windows MinGW BenchmarkGlobalWrite 2.470 ns/op -0.017 ns/op / -0.7% (better)
Windows MinGW BenchmarkGoroutine 94957 ns/op +1003 ns/op / +1.1% (worse)
Windows MinGW BenchmarkInterfaceCall 8.386 ns/op +0.001 ns/op / +0.01193% (worse)
Windows MinGW BenchmarkRuntimeGetG 2.487 ns/op -0.015 ns/op / -0.6% (better)
Windows MinGW 386 BenchmarkLookupPCRandom 26.540 ns/op -0.2 ns/op / -0.7% (better)
Windows MinGW 386 BenchmarkMergeCompilerFlags 759.600 ns/op +33.7 ns/op / +4.6% (worse)
Windows MinGW 386 BenchmarkMergeLinkerFlags 689.700 ns/op -7.6 ns/op / -1.1% (better)
Windows MinGW 386 BenchmarkChannelBuffered 41.230 ns/op +0.06 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkChannelHandoff 905 ns/op +185.2 ns/op / +25.7% (worse)
Windows MinGW 386 BenchmarkDefer 45.140 ns/op -0.04 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkDirectCall 1.554 ns/op -0.005 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkGlobalRead 1.555 ns/op +0.003 ns/op / +0.2% (worse)
Windows MinGW 386 BenchmarkGlobalWrite 7.797 ns/op +0.016 ns/op / +0.2% (worse)
Windows MinGW 386 BenchmarkGoroutine 106569 ns/op -560 ns/op / -0.5% (better)
Windows MinGW 386 BenchmarkInterfaceCall 8.437 ns/op +0.045 ns/op / +0.5% (worse)
Windows MinGW 386 BenchmarkRuntimeGetG 1.935 ns/op +0.004 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkLookupPCRandom 12.070 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 BenchmarkMergeCompilerFlags 559.200 ns/op -11.8 ns/op / -2.1% (better)
Windows MinGW ARM64 BenchmarkMergeLinkerFlags 535.200 ns/op +4.7 ns/op / +0.9% (worse)
Windows MinGW ARM64 BenchmarkChannelBuffered 38.940 ns/op +1.44 ns/op / +3.8% (worse)
Windows MinGW ARM64 BenchmarkChannelHandoff 2113 ns/op +185 ns/op / +9.6% (worse)
Windows MinGW ARM64 BenchmarkDefer 60.040 ns/op +2.28 ns/op / +3.9% (worse)
Windows MinGW ARM64 BenchmarkDirectCall 0.664 ns/op +0.0001 ns/op / +0.01507% (worse)
Windows MinGW ARM64 BenchmarkGlobalRead 0.664 ns/op -0.0002 ns/op / -0.03013% (better)
Windows MinGW ARM64 BenchmarkGlobalWrite 0.737 ns/op +0.0001 ns/op / +0.01357% (worse)
Windows MinGW ARM64 BenchmarkGoroutine 64799 ns/op -207 ns/op / -0.3% (better)
Windows MinGW ARM64 BenchmarkInterfaceCall 4.141 ns/op -0.001 ns/op / -0.02414% (better)
Windows MinGW ARM64 BenchmarkRuntimeGetG 1.802 ns/op -0.007 ns/op / -0.4% (better)
Windows MSVC BenchmarkLookupPCRandom 13.010 ns/op -0.18 ns/op / -1.4% (better)
Windows MSVC BenchmarkMergeCompilerFlags 619.100 ns/op -15.4 ns/op / -2.4% (better)
Windows MSVC BenchmarkMergeLinkerFlags 555.200 ns/op +5 ns/op / +0.9% (worse)
Windows MSVC BenchmarkChannelBuffered 29.770 ns/op +0.1 ns/op / +0.3% (worse)
Windows MSVC BenchmarkChannelHandoff 1093 ns/op -30 ns/op / -2.7% (better)
Windows MSVC BenchmarkDefer 53.590 ns/op -0.38 ns/op / -0.7% (better)
Windows MSVC BenchmarkDirectCall 1.574 ns/op +0.027 ns/op / +1.7% (worse)
Windows MSVC BenchmarkGlobalRead 1.548 ns/op -0.002 ns/op / -0.1% (better)
Windows MSVC BenchmarkGlobalWrite 2.468 ns/op -0.001 ns/op / -0.0405% (better)
Windows MSVC BenchmarkGoroutine 87099 ns/op -1756 ns/op / -2.0% (better)
Windows MSVC BenchmarkInterfaceCall 8.989 ns/op -0.004 ns/op / -0.04448% (better)
Windows MSVC BenchmarkRuntimeGetG 2.482 ns/op -0.007 ns/op / -0.3% (better)
Windows MSVC 386 BenchmarkLookupPCRandom 26.490 ns/op +0.03 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkMergeCompilerFlags 763.300 ns/op +0.7 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkMergeLinkerFlags 698.700 ns/op +7 ns/op / +1.0% (worse)
Windows MSVC 386 BenchmarkChannelBuffered 38.750 ns/op -0.06 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkChannelHandoff 782.300 ns/op -85.9 ns/op / -9.9% (better)
Windows MSVC 386 BenchmarkDefer 45.150 ns/op -0.48 ns/op / -1.1% (better)
Windows MSVC 386 BenchmarkDirectCall 1.552 ns/op +0.005 ns/op / +0.3% (worse)
Windows MSVC 386 BenchmarkGlobalRead 1.552 ns/op +0.001 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkGlobalWrite 7.773 ns/op -0.006 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkGoroutine 108818 ns/op -2015 ns/op / -1.8% (better)
Windows MSVC 386 BenchmarkInterfaceCall 8.385 ns/op -0.012 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkRuntimeGetG 2.174 ns/op +0.006 ns/op / +0.3% (worse)
Windows MSVC ARM64 BenchmarkLookupPCRandom 12.020 ns/op -0.01 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkMergeCompilerFlags 579.100 ns/op -2.5 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkMergeLinkerFlags 528.900 ns/op +5.5 ns/op / +1.1% (worse)
Windows MSVC ARM64 BenchmarkChannelBuffered 37.560 ns/op -1.02 ns/op / -2.6% (better)
Windows MSVC ARM64 BenchmarkChannelHandoff 2861 ns/op -8 ns/op / -0.3% (better)
Windows MSVC ARM64 BenchmarkDefer 61.560 ns/op -0.74 ns/op / -1.2% (better)
Windows MSVC ARM64 BenchmarkDirectCall 0.663 ns/op -0.0001 ns/op / -0.01508% (better)
Windows MSVC ARM64 BenchmarkGlobalRead 0.664 ns/op +0.0006 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkGlobalWrite 3.795 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkGoroutine 58699 ns/op -4371 ns/op / -6.9% (better)
Windows MSVC ARM64 BenchmarkInterfaceCall 4.140 ns/op -0.005 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkRuntimeGetG 1.770 ns/op -0.002 ns/op / -0.1% (better)
Timer runtime benchmarks
Platform Operation and runtime ns/op vs base
Linux AfterFuncZeroDelivery/Go 901.100 ns/op -32.8 ns/op / -3.5% (better)
Linux AfterFuncZeroDelivery/LLGo 46440 ns/op -3265 ns/op / -6.6% (better)
Linux CreateStop/Go 301.900 ns/op -3 ns/op / -1.0% (better)
Linux CreateStop/LLGo 1995 ns/op -9 ns/op / -0.4% (better)
Linux RearmStopped/Go 116 ns/op +0.1 ns/op / +0.1% (worse)
Linux RearmStopped/LLGo 1223 ns/op -372 ns/op / -23.3% (better)
Linux ResetActive/Go 68.690 ns/op +0.05 ns/op / +0.1% (worse)
Linux ResetActive/LLGo 604 ns/op -113.1 ns/op / -15.8% (better)
Linux ResetHeap1024/Go 67.030 ns/op -0.02 ns/op / -0.02983% (better)
Linux ResetHeap1024/LLGo 181.500 ns/op -1.4 ns/op / -0.8% (better)
macOS AfterFuncZeroDelivery/Go 442.300 ns/op -23 ns/op / -4.9% (better)
macOS AfterFuncZeroDelivery/LLGo 67740 ns/op -1345 ns/op / -1.9% (better)
macOS CreateStop/Go 139.800 ns/op +1.9 ns/op / +1.4% (worse)
macOS CreateStop/LLGo 450.400 ns/op +1.1 ns/op / +0.2% (worse)
macOS RearmStopped/Go 58.350 ns/op 0 ns/op / +0.0%
macOS RearmStopped/LLGo 315 ns/op -10.5 ns/op / -3.2% (better)
macOS ResetActive/Go 43.630 ns/op +0.84 ns/op / +2.0% (worse)
macOS ResetActive/LLGo 148.300 ns/op -4.1 ns/op / -2.7% (better)
macOS ResetHeap1024/Go 42.410 ns/op -1.06 ns/op / -2.4% (better)
macOS ResetHeap1024/LLGo 90.870 ns/op +1.81 ns/op / +2.0% (worse)
Windows MinGW AfterFuncZeroDelivery/Go 556.100 ns/op -4.1 ns/op / -0.7% (better)
Windows MinGW AfterFuncZeroDelivery/LLGo 187072 ns/op -5607 ns/op / -2.9% (better)
Windows MinGW CreateStop/Go 115.600 ns/op -0.6 ns/op / -0.5% (better)
Windows MinGW CreateStop/LLGo 440.700 ns/op +23.4 ns/op / +5.6% (worse)
Windows MinGW RearmStopped/Go 31.620 ns/op +0.09 ns/op / +0.3% (worse)
Windows MinGW RearmStopped/LLGo 272.300 ns/op -18.9 ns/op / -6.5% (better)
Windows MinGW ResetActive/Go 20.090 ns/op -0.22 ns/op / -1.1% (better)
Windows MinGW ResetActive/LLGo 173.400 ns/op -2.5 ns/op / -1.4% (better)
Windows MinGW ResetHeap1024/Go 20.620 ns/op -0.04 ns/op / -0.2% (better)
Windows MinGW ResetHeap1024/LLGo 125.900 ns/op +0.9 ns/op / +0.7% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/Go 965.700 ns/op -1 ns/op / -0.1% (better)
Windows MinGW 386 AfterFuncZeroDelivery/LLGo 200370 ns/op +194 ns/op / +0.1% (worse)
Windows MinGW 386 CreateStop/Go 192.400 ns/op +2.1 ns/op / +1.1% (worse)
Windows MinGW 386 CreateStop/LLGo 511.600 ns/op -18.3 ns/op / -3.5% (better)
Windows MinGW 386 RearmStopped/Go 63.410 ns/op -0.18 ns/op / -0.3% (better)
Windows MinGW 386 RearmStopped/LLGo 367.300 ns/op +13.8 ns/op / +3.9% (worse)
Windows MinGW 386 ResetActive/Go 39.740 ns/op +0.51 ns/op / +1.3% (worse)
Windows MinGW 386 ResetActive/LLGo 994.100 ns/op +82.5 ns/op / +9.1% (worse)
Windows MinGW 386 ResetHeap1024/Go 39.460 ns/op -0.19 ns/op / -0.5% (better)
Windows MinGW 386 ResetHeap1024/LLGo 187.300 ns/op -1.1 ns/op / -0.6% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/Go 675.900 ns/op +0.7 ns/op / +0.1% (worse)
Windows MinGW ARM64 AfterFuncZeroDelivery/LLGo 152831 ns/op +6317 ns/op / +4.3% (worse)
Windows MinGW ARM64 CreateStop/Go 201.600 ns/op -11.1 ns/op / -5.2% (better)
Windows MinGW ARM64 CreateStop/LLGo 398.600 ns/op +6.4 ns/op / +1.6% (worse)
Windows MinGW ARM64 RearmStopped/Go 70.630 ns/op -0.01 ns/op / -0.01416% (better)
Windows MinGW ARM64 RearmStopped/LLGo 260 ns/op -0.6 ns/op / -0.2% (better)
Windows MinGW ARM64 ResetActive/Go 31.020 ns/op -0.06 ns/op / -0.2% (better)
Windows MinGW ARM64 ResetActive/LLGo 127.100 ns/op +4.7 ns/op / +3.8% (worse)
Windows MinGW ARM64 ResetHeap1024/Go 31.130 ns/op +0.04 ns/op / +0.1% (worse)
Windows MinGW ARM64 ResetHeap1024/LLGo 124.300 ns/op -0.5 ns/op / -0.4% (better)
Windows MSVC AfterFuncZeroDelivery/Go 551 ns/op -4.3 ns/op / -0.8% (better)
Windows MSVC AfterFuncZeroDelivery/LLGo 174833 ns/op +290 ns/op / +0.2% (worse)
Windows MSVC CreateStop/Go 115 ns/op -1.5 ns/op / -1.3% (better)
Windows MSVC CreateStop/LLGo 413.600 ns/op +10.1 ns/op / +2.5% (worse)
Windows MSVC RearmStopped/Go 31.340 ns/op -0.16 ns/op / -0.5% (better)
Windows MSVC RearmStopped/LLGo 264.700 ns/op -65.1 ns/op / -19.7% (better)
Windows MSVC ResetActive/Go 20.090 ns/op -0.16 ns/op / -0.8% (better)
Windows MSVC ResetActive/LLGo 155.800 ns/op -23.7 ns/op / -13.2% (better)
Windows MSVC ResetHeap1024/Go 20.330 ns/op -0.1 ns/op / -0.5% (better)
Windows MSVC ResetHeap1024/LLGo 124.700 ns/op +1.2 ns/op / +1.0% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/Go 957 ns/op +2.4 ns/op / +0.3% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/LLGo 205931 ns/op +1732 ns/op / +0.8% (worse)
Windows MSVC 386 CreateStop/Go 192.900 ns/op -0.8 ns/op / -0.4% (better)
Windows MSVC 386 CreateStop/LLGo 474.400 ns/op +6.7 ns/op / +1.4% (worse)
Windows MSVC 386 RearmStopped/Go 63.250 ns/op -0.28 ns/op / -0.4% (better)
Windows MSVC 386 RearmStopped/LLGo 321.300 ns/op -2 ns/op / -0.6% (better)
Windows MSVC 386 ResetActive/Go 38.940 ns/op -0.07 ns/op / -0.2% (better)
Windows MSVC 386 ResetActive/LLGo 929.600 ns/op -21.6 ns/op / -2.3% (better)
Windows MSVC 386 ResetHeap1024/Go 39.320 ns/op -0.14 ns/op / -0.4% (better)
Windows MSVC 386 ResetHeap1024/LLGo 170.100 ns/op +1.2 ns/op / +0.7% (worse)
Windows MSVC ARM64 AfterFuncZeroDelivery/Go 663.800 ns/op +8.7 ns/op / +1.3% (worse)
Windows MSVC ARM64 AfterFuncZeroDelivery/LLGo 169750 ns/op +290 ns/op / +0.2% (worse)
Windows MSVC ARM64 CreateStop/Go 198 ns/op +5.3 ns/op / +2.8% (worse)
Windows MSVC ARM64 CreateStop/LLGo 382.800 ns/op -0.9 ns/op / -0.2% (better)
Windows MSVC ARM64 RearmStopped/Go 70.610 ns/op +0.05 ns/op / +0.1% (worse)
Windows MSVC ARM64 RearmStopped/LLGo 268.800 ns/op -3.2 ns/op / -1.2% (better)
Windows MSVC ARM64 ResetActive/Go 31.090 ns/op +0.11 ns/op / +0.4% (worse)
Windows MSVC ARM64 ResetActive/LLGo 133.900 ns/op -4.9 ns/op / -3.5% (better)
Windows MSVC ARM64 ResetHeap1024/Go 31.110 ns/op +0.05 ns/op / +0.2% (worse)
Windows MSVC ARM64 ResetHeap1024/LLGo 136.600 ns/op -1.7 ns/op / -1.2% (better)

Compared with 78973102bf54 measured in the same runner job.

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

LLGo WebAssembly build benchmarks

5c4020c76e6b | 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 149240 B 0 B / +0.0% 88157 B 0 B / +0.0%
cprintf/j32-goos-js/LLGo 148511 B 0 B / +0.0% 72985 B 0 B / +0.0%
cprintf/j64-emscripten-memory64/LLGo 136707 B 0 B / +0.0% 91328 B 0 B / +0.0%
cprintf/w32-goos-wasip1/LLGo 154296 B 0 B / +0.0% 0 B 0 B / 0.0%
cprintf/w32-wasi/LLGo 154979 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/j32-emscripten/LLGo 3049126 B 0 B / +0.0% 130373 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 3145152 B 0 B / +0.0% 100773 B 0 B / +0.0%
fmtprintf/j64-emscripten-memory64/LLGo 2811842 B 0 B / +0.0% 135853 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 2349801 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/w32-wasi/LLGo 2346433 B 0 B / +0.0% 0 B 0 B / 0.0%
j32-emscripten/LLGo 148582 B 0 B / +0.0% 88157 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 148002 B 0 B / +0.0% 72985 B 0 B / +0.0%
j64-emscripten-memory64/LLGo 136047 B 0 B / +0.0% 91328 B 0 B / +0.0%
reflectcall/j32-emscripten/LLGo 1473259 B 0 B / +0.0% 104917 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 1523186 B 0 B / +0.0% 89743 B 0 B / +0.0%
reflectcall/j64-emscripten-memory64/LLGo 1366025 B 0 B / +0.0% 109492 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 1278240 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/w32-wasi/LLGo 1275819 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 153943 B 0 B / +0.0% 0 B 0 B / 0.0%
w32-wasi/LLGo 154626 B 0 B / +0.0% 0 B 0 B / 0.0%
LLGo WebAssembly build measurements
Example and profile Build vs base
j32-emscripten 6.805 s -117.5 ms / -1.7% (better)
j32-goos-js 6.810 s -389.4 ms / -5.4% (better)
j64-emscripten-memory64 6.195 s -199.7 ms / -3.1% (better)
reflectcall/w32-wasi 23.486 s -641.2 ms / -2.7% (better)
w32-goos-wasip1 4.359 s -48.56 ms / -1.1% (better)
w32-wasi 4.162 s -154.9 ms / -3.6% (better)

Compared with 78973102bf54 measured in the same runner job.

@cpunion
cpunion merged commit d17af3c into xgo-dev:main Oct 6, 2026
92 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.

1 participant