Skip to content

test: remove duplicate heap mode declaration from GC fixture - #2818

Closed
cpunion wants to merge 1 commit into
xgo-dev:mainfrom
cpunion:codex/gc-fixture-duplicate-20261014
Closed

cpunion wants to merge 1 commit into
xgo-dev:mainfrom
cpunion:codex/gc-fixture-duplicate-20261014

Conversation

@cpunion

@cpunion cpunion commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

The same correction is now merged into main through #2821. No additional code change is needed.

TestWasmGCSegmentBoundariesAndSweep generates a fixture that declares segmentedHeap as both a constant and a variable. Go CI fails before running the metadata checks because the name is redeclared and the test cannot switch heap modes.

Remove the redundant constant and retain the existing variable used by the segmented and single-arena cases.

Validation: reproduced the compile failure before the change; the segment, head-cache, and arena fixtures all pass afterward with go test -count=1 -timeout=90s -run '^TestWasmGC' wasm_gc_segments_test.go wasm_gc_head_cache_test.go wasm_gc_arena_test.go from internal/build.

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

This PR removes a duplicate const segmentedHeap = true from the embedded Go source fixture gcSegmentWorkloadSource, which previously collided with var segmentedHeap = true on line 83. The fix is correct and minimal.

The var form is the right one to keep: the fixture reassigns segmentedHeap at resetHeap() (line 94, sets true) and TestSingleArenaLookup (line 209, sets false) so a single test binary can exercise both the segmented and single-arena lookup paths. A const could neither coexist with the var nor be reassigned, so the base revision's generated fixture would fail to compile — this deletion resolves that.

All four review passes (code quality, performance, security, documentation accuracy) found no blocking issues. One optional maintainability note below; nearby comments remain accurate.

Note (out of scope for this one-line fix): because the entire test package is embedded as a backtick string, the compiler cannot validate it until the outer test spawns go test, which is how this duplicate declaration went unnoticed. If this fixture keeps growing, consider moving the source into a testdata/ file so editors and gofmt/go vet can validate it.

Additional findings

  • internal/build/wasm_gc_segments_test.go:83: [P3] Document why the fixture uses var, not the runtime's const: Optional, non-blocking. In the real runtime, segmentedHeap is a build-tag-selected const (false in runtime/internal/runtime/tinygogc/gc_segment_default.go, true in gc_segment_wasi_threads.go). This fixture deliberately makes it a mutable var so one test binary can toggle both lookup paths (TestSingleArenaLookup sets it to false). A short comment here — e.g. // const in the runtime; a var in the fixture so tests can toggle both lookup paths — would document that intentional divergence and discourage a future reader from "restoring" the const that this PR just removed.

@codecov

codecov Bot commented Oct 14, 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

Copy link
Copy Markdown

LLGo WebAssembly build benchmarks

ea2b65c90bc9 | 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 147057 B 0 B / +0.0% 88541 B 0 B / +0.0%
cprintf/j32-goos-js/LLGo 145666 B 0 B / +0.0% 72985 B 0 B / +0.0%
cprintf/j64-emscripten-memory64/LLGo 134526 B 0 B / +0.0% 91712 B 0 B / +0.0%
cprintf/w32-goos-wasip1/LLGo 156385 B 0 B / +0.0% 0 B 0 B / 0.0%
cprintf/w32-wasi/LLGo 157083 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/j32-emscripten/LLGo 3003665 B 0 B / +0.0% 131047 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 3094062 B 0 B / +0.0% 102110 B 0 B / +0.0%
fmtprintf/j64-emscripten-memory64/LLGo 2766011 B 0 B / +0.0% 136527 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 2343602 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/w32-wasi/LLGo 2340298 B 0 B / +0.0% 0 B 0 B / 0.0%
j32-emscripten/LLGo 146574 B 0 B / +0.0% 88541 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 145414 B 0 B / +0.0% 72985 B 0 B / +0.0%
j64-emscripten-memory64/LLGo 134083 B 0 B / +0.0% 91712 B 0 B / +0.0%
reflectcall/j32-emscripten/LLGo 1446585 B 0 B / +0.0% 105303 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 1495430 B 0 B / +0.0% 89743 B 0 B / +0.0%
reflectcall/j64-emscripten-memory64/LLGo 1338918 B 0 B / +0.0% 109882 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 1273789 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/w32-wasi/LLGo 1271430 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 156059 B 0 B / +0.0% 0 B 0 B / 0.0%
w32-wasi/LLGo 156757 B 0 B / +0.0% 0 B 0 B / 0.0%
LLGo WebAssembly build measurements
Example and profile Build vs base
j32-emscripten 7.857 s +114.5 ms / +1.5% (worse)
j32-goos-js 7.923 s +331.6 ms / +4.4% (worse)
j64-emscripten-memory64 6.740 s +163.6 ms / +2.5% (worse)
reflectcall/w32-wasi 24.798 s -934.6 ms / -3.6% (better)
w32-goos-wasip1 4.748 s +150.5 ms / +3.3% (worse)
w32-wasi 4.323 s -142.6 ms / -3.2% (better)

Compared with 45bdf2db295a measured in the same runner job.

@github-actions

Copy link
Copy Markdown

LLGo baseline benchmarks

ea2b65c90bc9 | 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.035 s -138.2 ms / -11.8% (better) 1.370 ms -117.3 us / -7.9% (better)
Linux cprintf-lto 8408 B 0 B / +0.0% 368 B 0 B / +0.0% 987.293 ms -153.1 ms / -13.4% (better) 1.412 ms +26 us / +1.9% (worse)
Linux fmtprintf 4915576 B 0 B / +0.0% 506206 B 0 B / +0.0% 7.148 s +454.7 ms / +6.8% (worse) 4.622 ms +96.42 us / +2.1% (worse)
Linux fmtprintf-lto 3621616 B 0 B / +0.0% 444290 B 0 B / +0.0% 17.614 s +561.4 ms / +3.3% (worse) 4.770 ms -172.3 us / -3.5% (better)
Linux println 705080 B 0 B / +0.0% 17095 B 0 B / +0.0% 1.062 s -95.61 ms / -8.3% (better) 2.122 ms +249.7 us / +13.3% (worse)
Linux println-lto 192928 B 0 B / +0.0% 14484 B 0 B / +0.0% 1.356 s -137.9 ms / -9.2% (better) 1.833 ms -53.11 us / -2.8% (better)
macOS cprintf 50736 B 0 B / +0.0% 4409 B 0 B / +0.0% 1.368 s +128 ms / +10.3% (worse) 4.241 ms -1.273 ms / -23.1% (better)
macOS cprintf-lto 50496 B 0 B / +0.0% 161 B 0 B / +0.0% 1.260 s +124.2 ms / +10.9% (worse) 2.955 ms -404.6 us / -12.0% (better)
macOS fmtprintf 1793088 B 0 B / +0.0% 883744 B 0 B / +0.0% 4.820 s -702.9 ms / -12.7% (better) 35.490 ms -11.34 ms / -24.2% (better)
macOS fmtprintf-lto 1362176 B 0 B / +0.0% 767588 B 0 B / +0.0% 12.794 s -1.273 s / -9.0% (better) 95.230 ms -41.56 ms / -30.4% (better)
macOS println 100080 B 0 B / +0.0% 24519 B 0 B / +0.0% 1.255 s -294.1 ms / -19.0% (better) 7.519 ms +1.387 ms / +22.6% (worse)
macOS println-lto 84016 B 0 B / +0.0% 21760 B 0 B / +0.0% 1.458 s -24.09 ms / -1.6% (better) 4.354 ms -2.563 ms / -37.0% (better)
Windows MinGW cprintf 676352 B 0 B / +0.0% 4550 B 0 B / +0.0% 1.633 s +33.47 ms / +2.1% (worse) 3.856 ms -28.9 us / -0.7% (better)
Windows MinGW cprintf-lto 44544 B 0 B / +0.0% 4502 B 0 B / +0.0% 1.687 s -7.627 ms / -0.5% (better) 3.505 ms -334.8 us / -8.7% (better)
Windows MinGW fmtprintf 5473792 B 0 B / +0.0% 606134 B 0 B / +0.0% 5.396 s +65.41 ms / +1.2% (worse) 10.711 ms -96.8 us / -0.9% (better)
Windows MinGW fmtprintf-lto 4161024 B 0 B / +0.0% 553254 B 0 B / +0.0% 12.748 s -128.4 ms / -1.0% (better) 10.292 ms +235.1 us / +2.3% (worse)
Windows MinGW println 733696 B 0 B / +0.0% 25446 B 0 B / +0.0% 1.637 s -28.32 ms / -1.7% (better) 6.739 ms -568.3 us / -7.8% (better)
Windows MinGW println-lto 210944 B 0 B / +0.0% 22326 B 0 B / +0.0% 1.902 s -2.92 ms / -0.2% (better) 6.692 ms -207.2 us / -3.0% (better)
Windows MinGW 386 cprintf 627200 B 0 B / +0.0% 5352 B 0 B / +0.0% 1.528 s -36.5 ms / -2.3% (better) 5.093 ms -64 us / -1.2% (better)
Windows MinGW 386 cprintf-lto 104448 B 0 B / +0.0% 5112 B 0 B / +0.0% 1.570 s -34.15 ms / -2.1% (better) 5.031 ms -196.4 us / -3.8% (better)
Windows MinGW 386 fmtprintf 4776960 B 0 B / +0.0% 473902 B 0 B / +0.0% 5.190 s -30.89 ms / -0.6% (better) 12.079 ms -493.2 us / -3.9% (better)
Windows MinGW 386 fmtprintf-lto 4163072 B 0 B / +0.0% 452294 B 0 B / +0.0% 12.431 s +28.24 ms / +0.2% (worse) 13.211 ms +220.2 us / +1.7% (worse)
Windows MinGW 386 println 681472 B 0 B / +0.0% 21694 B 0 B / +0.0% 1.543 s -26.01 ms / -1.7% (better) 8.635 ms -298.3 us / -3.3% (better)
Windows MinGW 386 println-lto 260608 B 0 B / +0.0% 19514 B 0 B / +0.0% 1.813 s -21.62 ms / -1.2% (better) 8.807 ms -49.6 us / -0.6% (better)
Windows MinGW ARM64 cprintf 686080 B 0 B / +0.0% 4436 B 0 B / +0.0% 1.810 s +5.752 ms / +0.3% (worse) 5.890 ms -478.2 us / -7.5% (better)
Windows MinGW ARM64 cprintf-lto 44032 B 0 B / +0.0% 4388 B 0 B / +0.0% 1.838 s -19.04 ms / -1.0% (better) 6.136 ms -229.7 us / -3.6% (better)
Windows MinGW ARM64 fmtprintf 5382656 B 0 B / +0.0% 514292 B 0 B / +0.0% 5.242 s +68.97 ms / +1.3% (worse) 14.191 ms +610.3 us / +4.5% (worse)
Windows MinGW ARM64 fmtprintf-lto 4327424 B 0 B / +0.0% 480352 B 0 B / +0.0% 11.817 s +103.9 ms / +0.9% (worse) 14.335 ms -204.2 us / -1.4% (better)
Windows MinGW ARM64 println 739840 B 0 B / +0.0% 24160 B 0 B / +0.0% 1.819 s +34.01 ms / +1.9% (worse) 10.525 ms +268.9 us / +2.6% (worse)
Windows MinGW ARM64 println-lto 218624 B 0 B / +0.0% 21516 B 0 B / +0.0% 2.082 s +31.01 ms / +1.5% (worse) 10.124 ms -49.9 us / -0.5% (better)
Windows MSVC cprintf 921088 B 0 B / +0.0% 66003 B 0 B / +0.0% 1.404 s -171.7 ms / -10.9% (better) 3.406 ms -174.7 us / -4.9% (better)
Windows MSVC cprintf-lto 292352 B 0 B / +0.0% 65971 B 0 B / +0.0% 1.411 s -25.84 ms / -1.8% (better) 3.305 ms -74 us / -2.2% (better)
Windows MSVC fmtprintf 5774848 B 0 B / +0.0% 701894 B 0 B / +0.0% 4.873 s +24 ms / +0.5% (worse) 11.495 ms -242.9 us / -2.1% (better)
Windows MSVC fmtprintf-lto 4484096 B 0 B / +0.0% 652806 B 0 B / +0.0% 11.836 s +31.22 ms / +0.3% (worse) 12.119 ms +86.8 us / +0.7% (worse)
Windows MSVC println 1044992 B 0 B / +0.0% 121334 B 0 B / +0.0% 1.480 s +68.71 ms / +4.9% (worse) 9.790 ms +2.709 ms / +38.2% (worse)
Windows MSVC println-lto 531456 B 0 B / +0.0% 118870 B 0 B / +0.0% 1.655 s -3.664 ms / -0.2% (better) 6.693 ms -420.6 us / -5.9% (better)
Windows MSVC 386 cprintf 538624 B 0 B / +0.0% 3947 B 0 B / +0.0% 1.319 s -122.6 ms / -8.5% (better) 5.400 ms -277.1 us / -4.9% (better)
Windows MSVC 386 cprintf-lto 44544 B 0 B / +0.0% 3901 B 0 B / +0.0% 1.579 s +174.8 ms / +12.4% (worse) 5.153 ms -427.9 us / -7.7% (better)
Windows MSVC 386 fmtprintf 4508672 B 0 B / +0.0% 457314 B 0 B / +0.0% 4.893 s +31.24 ms / +0.6% (worse) 12.864 ms -435.4 us / -3.3% (better)
Windows MSVC 386 fmtprintf-lto 3910656 B 0 B / +0.0% 427681 B 0 B / +0.0% 11.415 s +102.1 ms / +0.9% (worse) 13.844 ms +199.4 us / +1.5% (worse)
Windows MSVC 386 println 593920 B 0 B / +0.0% 20566 B 0 B / +0.0% 1.328 s -249.1 ms / -15.8% (better) 9.366 ms -188.1 us / -2.0% (better)
Windows MSVC 386 println-lto 200192 B 0 B / +0.0% 18711 B 0 B / +0.0% 1.588 s -56.65 ms / -3.4% (better) 9.168 ms -486.9 us / -5.0% (better)
Windows MSVC ARM64 cprintf 687616 B 0 B / +0.0% 4240 B 0 B / +0.0% 1.641 s -81.96 ms / -4.8% (better) 7.646 ms -504 us / -6.2% (better)
Windows MSVC ARM64 cprintf-lto 49152 B 0 B / +0.0% 4140 B 0 B / +0.0% 1.658 s -34.56 ms / -2.0% (better) 7.205 ms -375.6 us / -5.0% (better)
Windows MSVC ARM64 fmtprintf 5379072 B 0 B / +0.0% 514164 B 0 B / +0.0% 5.058 s -125.5 ms / -2.4% (better) 17.099 ms -395.2 us / -2.3% (better)
Windows MSVC ARM64 fmtprintf-lto 4334080 B 0 B / +0.0% 480960 B 0 B / +0.0% 11.498 s -249.5 ms / -2.1% (better) 17.969 ms -131.2 us / -0.7% (better)
Windows MSVC ARM64 println 741376 B 0 B / +0.0% 24200 B 0 B / +0.0% 1.646 s -28.81 ms / -1.7% (better) 12.655 ms -195.5 us / -1.5% (better)
Windows MSVC ARM64 println-lto 223232 B 0 B / +0.0% 21688 B 0 B / +0.0% 1.866 s -12.74 ms / -0.7% (better) 13.386 ms +771.1 us / +6.1% (worse)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 14.730 ns/op -0.33 ns/op / -2.2% (better)
Linux BenchmarkMergeCompilerFlags 200 ns/op -8.3 ns/op / -4.0% (better)
Linux BenchmarkMergeLinkerFlags 148.500 ns/op -3 ns/op / -2.0% (better)
Linux BenchmarkChannelBuffered 55.180 ns/op -0.26 ns/op / -0.5% (better)
Linux BenchmarkChannelHandoff 15300 ns/op +2149 ns/op / +16.3% (worse)
Linux BenchmarkDefer 50.950 ns/op -15.12 ns/op / -22.9% (better)
Linux BenchmarkDirectCall 1.189 ns/op +0.022 ns/op / +1.9% (worse)
Linux BenchmarkGlobalRead 1.167 ns/op -0.003 ns/op / -0.3% (better)
Linux BenchmarkGlobalWrite 7.786 ns/op -0.04 ns/op / -0.5% (better)
Linux BenchmarkGoroutine 31135 ns/op -5729 ns/op / -15.5% (better)
Linux BenchmarkInterfaceCall 5.980 ns/op +0.031 ns/op / +0.5% (worse)
Linux BenchmarkRuntimeGetG 2.864 ns/op -0.083 ns/op / -2.8% (better)
macOS BenchmarkLookupPCRandom 16.420 ns/op -4.04 ns/op / -19.7% (better)
macOS BenchmarkMergeCompilerFlags 153.300 ns/op -20.8 ns/op / -11.9% (better)
macOS BenchmarkMergeLinkerFlags 94.320 ns/op -21.08 ns/op / -18.3% (better)
macOS BenchmarkChannelBuffered 36.430 ns/op +7.07 ns/op / +24.1% (worse)
macOS BenchmarkChannelHandoff 8025 ns/op +1205 ns/op / +17.7% (worse)
macOS BenchmarkDefer 49.590 ns/op +12.47 ns/op / +33.6% (worse)
macOS BenchmarkDirectCall 1.532 ns/op +0.1 ns/op / +7.0% (worse)
macOS BenchmarkGlobalRead 1.207 ns/op -0.222 ns/op / -15.5% (better)
macOS BenchmarkGlobalWrite 1.576 ns/op +0.071 ns/op / +4.7% (worse)
macOS BenchmarkGoroutine 78838 ns/op +31332 ns/op / +66.0% (worse)
macOS BenchmarkInterfaceCall 5.011 ns/op +0.086 ns/op / +1.7% (worse)
macOS BenchmarkRuntimeGetG 2.798 ns/op +0.177 ns/op / +6.8% (worse)
Windows MinGW BenchmarkLookupPCRandom 12.760 ns/op -0.42 ns/op / -3.2% (better)
Windows MinGW BenchmarkMergeCompilerFlags 625.300 ns/op +12.9 ns/op / +2.1% (worse)
Windows MinGW BenchmarkMergeLinkerFlags 545.400 ns/op +8.4 ns/op / +1.6% (worse)
Windows MinGW BenchmarkChannelBuffered 30.060 ns/op -0.09 ns/op / -0.3% (better)
Windows MinGW BenchmarkChannelHandoff 1057 ns/op -5 ns/op / -0.5% (better)
Windows MinGW BenchmarkDefer 53.820 ns/op +1.26 ns/op / +2.4% (worse)
Windows MinGW BenchmarkDirectCall 1.552 ns/op +0.004 ns/op / +0.3% (worse)
Windows MinGW BenchmarkGlobalRead 1.549 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkGlobalWrite 2.467 ns/op -0.004 ns/op / -0.2% (better)
Windows MinGW BenchmarkGoroutine 91496 ns/op +1303 ns/op / +1.4% (worse)
Windows MinGW BenchmarkInterfaceCall 8.061 ns/op -0.007 ns/op / -0.1% (better)
Windows MinGW BenchmarkRuntimeGetG 2.480 ns/op +0.002 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkLookupPCRandom 27.760 ns/op -0.07 ns/op / -0.3% (better)
Windows MinGW 386 BenchmarkMergeCompilerFlags 782.200 ns/op +16.6 ns/op / +2.2% (worse)
Windows MinGW 386 BenchmarkMergeLinkerFlags 717 ns/op +9.3 ns/op / +1.3% (worse)
Windows MinGW 386 BenchmarkChannelBuffered 43.630 ns/op +0.03 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkChannelHandoff 898.100 ns/op +3.2 ns/op / +0.4% (worse)
Windows MinGW 386 BenchmarkDefer 43.300 ns/op -0.88 ns/op / -2.0% (better)
Windows MinGW 386 BenchmarkDirectCall 1.748 ns/op -0.001 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkGlobalRead 1.749 ns/op 0 ns/op / +0.0%
Windows MinGW 386 BenchmarkGlobalWrite 8.988 ns/op 0 ns/op / +0.0%
Windows MinGW 386 BenchmarkGoroutine 91192 ns/op +4782 ns/op / +5.5% (worse)
Windows MinGW 386 BenchmarkInterfaceCall 9.453 ns/op +0.01 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkRuntimeGetG 2.449 ns/op -0.001 ns/op / -0.04082% (better)
Windows MinGW ARM64 BenchmarkLookupPCRandom 12.090 ns/op +0.01 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkMergeCompilerFlags 563.300 ns/op -59.8 ns/op / -9.6% (better)
Windows MinGW ARM64 BenchmarkMergeLinkerFlags 531.700 ns/op -57.4 ns/op / -9.7% (better)
Windows MinGW ARM64 BenchmarkChannelBuffered 38.510 ns/op +0.93 ns/op / +2.5% (worse)
Windows MinGW ARM64 BenchmarkChannelHandoff 2534 ns/op -47 ns/op / -1.8% (better)
Windows MinGW ARM64 BenchmarkDefer 54.070 ns/op +1.05 ns/op / +2.0% (worse)
Windows MinGW ARM64 BenchmarkDirectCall 0.590 ns/op +0.0002 ns/op / +0.03393% (worse)
Windows MinGW ARM64 BenchmarkGlobalRead 0.593 ns/op -0.0003 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkGlobalWrite 0.664 ns/op +0.0002 ns/op / +0.03015% (worse)
Windows MinGW ARM64 BenchmarkGoroutine 60736 ns/op +1003 ns/op / +1.7% (worse)
Windows MinGW ARM64 BenchmarkInterfaceCall 4.141 ns/op -0.005 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkRuntimeGetG 1.796 ns/op 0 ns/op / +0.0%
Windows MSVC BenchmarkLookupPCRandom 12.500 ns/op +0.16 ns/op / +1.3% (worse)
Windows MSVC BenchmarkMergeCompilerFlags 536 ns/op +3.9 ns/op / +0.7% (worse)
Windows MSVC BenchmarkMergeLinkerFlags 464.200 ns/op -3.3 ns/op / -0.7% (better)
Windows MSVC BenchmarkChannelBuffered 29.880 ns/op +0.19 ns/op / +0.6% (worse)
Windows MSVC BenchmarkChannelHandoff 1364 ns/op +18 ns/op / +1.3% (worse)
Windows MSVC BenchmarkDefer 57.450 ns/op +3.61 ns/op / +6.7% (worse)
Windows MSVC BenchmarkDirectCall 1.746 ns/op -0.002 ns/op / -0.1% (better)
Windows MSVC BenchmarkGlobalRead 1.746 ns/op -0.002 ns/op / -0.1% (better)
Windows MSVC BenchmarkGlobalWrite 2.794 ns/op +0.003 ns/op / +0.1% (worse)
Windows MSVC BenchmarkGoroutine 74464 ns/op +4729 ns/op / +6.8% (worse)
Windows MSVC BenchmarkInterfaceCall 9.101 ns/op -0.008 ns/op / -0.1% (better)
Windows MSVC BenchmarkRuntimeGetG 2.101 ns/op +0.002 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkLookupPCRandom 27.790 ns/op -0.04 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkMergeCompilerFlags 717.900 ns/op -61.6 ns/op / -7.9% (better)
Windows MSVC 386 BenchmarkMergeLinkerFlags 714.600 ns/op +1.5 ns/op / +0.2% (worse)
Windows MSVC 386 BenchmarkChannelBuffered 43.700 ns/op +0.04 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkChannelHandoff 943.200 ns/op -44.1 ns/op / -4.5% (better)
Windows MSVC 386 BenchmarkDefer 47.730 ns/op -0.11 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkDirectCall 1.752 ns/op +0.004 ns/op / +0.2% (worse)
Windows MSVC 386 BenchmarkGlobalRead 1.748 ns/op -0.002 ns/op / -0.1% (better)
Windows MSVC 386 BenchmarkGlobalWrite 8.993 ns/op +0.002 ns/op / +0.02224% (worse)
Windows MSVC 386 BenchmarkGoroutine 93107 ns/op -596 ns/op / -0.6% (better)
Windows MSVC 386 BenchmarkInterfaceCall 9.449 ns/op -0.003 ns/op / -0.03174% (better)
Windows MSVC 386 BenchmarkRuntimeGetG 2.448 ns/op -0.078 ns/op / -3.1% (better)
Windows MSVC ARM64 BenchmarkLookupPCRandom 12.150 ns/op -0.01 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkMergeCompilerFlags 575.500 ns/op +1.8 ns/op / +0.3% (worse)
Windows MSVC ARM64 BenchmarkMergeLinkerFlags 538.400 ns/op +0.2 ns/op / +0.03716% (worse)
Windows MSVC ARM64 BenchmarkChannelBuffered 38.210 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkChannelHandoff 2874 ns/op -230 ns/op / -7.4% (better)
Windows MSVC ARM64 BenchmarkDefer 64.150 ns/op +0.66 ns/op / +1.0% (worse)
Windows MSVC ARM64 BenchmarkDirectCall 0.590 ns/op -0.0001 ns/op / -0.01696% (better)
Windows MSVC ARM64 BenchmarkGlobalRead 0.590 ns/op -0.0003 ns/op / -0.1% (better)
Windows MSVC ARM64 BenchmarkGlobalWrite 3.760 ns/op +0.019 ns/op / +0.5% (worse)
Windows MSVC ARM64 BenchmarkGoroutine 60558 ns/op +172 ns/op / +0.3% (worse)
Windows MSVC ARM64 BenchmarkInterfaceCall 4.144 ns/op +0.003 ns/op / +0.1% (worse)
Windows MSVC ARM64 BenchmarkRuntimeGetG 1.799 ns/op +0.029 ns/op / +1.6% (worse)
Timer runtime benchmarks
Platform Operation and runtime ns/op vs base
Linux AfterFuncZeroDelivery/Go 1051 ns/op +27 ns/op / +2.6% (worse)
Linux AfterFuncZeroDelivery/LLGo 42707 ns/op +1306 ns/op / +3.2% (worse)
Linux CreateStop/Go 349.900 ns/op +28.9 ns/op / +9.0% (worse)
Linux CreateStop/LLGo 1765 ns/op -100 ns/op / -5.4% (better)
Linux RearmStopped/Go 115.900 ns/op -0.2 ns/op / -0.2% (better)
Linux RearmStopped/LLGo 1342 ns/op -132 ns/op / -9.0% (better)
Linux ResetActive/Go 68.450 ns/op -0.59 ns/op / -0.9% (better)
Linux ResetActive/LLGo 772.400 ns/op -41.1 ns/op / -5.1% (better)
Linux ResetHeap1024/Go 67.110 ns/op -0.15 ns/op / -0.2% (better)
Linux ResetHeap1024/LLGo 165.900 ns/op +2.4 ns/op / +1.5% (worse)
macOS AfterFuncZeroDelivery/Go 600.200 ns/op -5.6 ns/op / -0.9% (better)
macOS AfterFuncZeroDelivery/LLGo 96693 ns/op -29148 ns/op / -23.2% (better)
macOS CreateStop/Go 183.900 ns/op -53.7 ns/op / -22.6% (better)
macOS CreateStop/LLGo 598.900 ns/op -135.1 ns/op / -18.4% (better)
macOS RearmStopped/Go 76.940 ns/op -10.52 ns/op / -12.0% (better)
macOS RearmStopped/LLGo 475.800 ns/op +20.4 ns/op / +4.5% (worse)
macOS ResetActive/Go 54.170 ns/op -9.64 ns/op / -15.1% (better)
macOS ResetActive/LLGo 200.100 ns/op -30.5 ns/op / -13.2% (better)
macOS ResetHeap1024/Go 55.500 ns/op -7.97 ns/op / -12.6% (better)
macOS ResetHeap1024/LLGo 149.300 ns/op +50.73 ns/op / +51.5% (worse)
Windows MinGW AfterFuncZeroDelivery/Go 567.200 ns/op +10.8 ns/op / +1.9% (worse)
Windows MinGW AfterFuncZeroDelivery/LLGo 180207 ns/op -1161 ns/op / -0.6% (better)
Windows MinGW CreateStop/Go 115.700 ns/op +0.8 ns/op / +0.7% (worse)
Windows MinGW CreateStop/LLGo 489.500 ns/op -38.5 ns/op / -7.3% (better)
Windows MinGW RearmStopped/Go 31.420 ns/op -0.24 ns/op / -0.8% (better)
Windows MinGW RearmStopped/LLGo 317.600 ns/op +71.6 ns/op / +29.1% (worse)
Windows MinGW ResetActive/Go 20.080 ns/op -0.05 ns/op / -0.2% (better)
Windows MinGW ResetActive/LLGo 164.700 ns/op +8.5 ns/op / +5.4% (worse)
Windows MinGW ResetHeap1024/Go 20.420 ns/op -0.13 ns/op / -0.6% (better)
Windows MinGW ResetHeap1024/LLGo 124.400 ns/op +7 ns/op / +6.0% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/Go 1013 ns/op +18.4 ns/op / +1.8% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/LLGo 166228 ns/op +544 ns/op / +0.3% (worse)
Windows MinGW 386 CreateStop/Go 217.900 ns/op +0.5 ns/op / +0.2% (worse)
Windows MinGW 386 CreateStop/LLGo 495.200 ns/op +0.3 ns/op / +0.1% (worse)
Windows MinGW 386 RearmStopped/Go 72.920 ns/op -0.2 ns/op / -0.3% (better)
Windows MinGW 386 RearmStopped/LLGo 330.600 ns/op +11.7 ns/op / +3.7% (worse)
Windows MinGW 386 ResetActive/Go 42.020 ns/op -0.06 ns/op / -0.1% (better)
Windows MinGW 386 ResetActive/LLGo 1008 ns/op -30 ns/op / -2.9% (better)
Windows MinGW 386 ResetHeap1024/Go 42.330 ns/op -0.03 ns/op / -0.1% (better)
Windows MinGW 386 ResetHeap1024/LLGo 181.800 ns/op -0.5 ns/op / -0.3% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/Go 669.600 ns/op -3.5 ns/op / -0.5% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/LLGo 143521 ns/op -2554 ns/op / -1.7% (better)
Windows MinGW ARM64 CreateStop/Go 192.800 ns/op -18.3 ns/op / -8.7% (better)
Windows MinGW ARM64 CreateStop/LLGo 424.700 ns/op +2.5 ns/op / +0.6% (worse)
Windows MinGW ARM64 RearmStopped/Go 70.640 ns/op +0.03 ns/op / +0.04249% (worse)
Windows MinGW ARM64 RearmStopped/LLGo 227.700 ns/op -0.8 ns/op / -0.4% (better)
Windows MinGW ARM64 ResetActive/Go 30.960 ns/op -0.06 ns/op / -0.2% (better)
Windows MinGW ARM64 ResetActive/LLGo 157.900 ns/op +20.2 ns/op / +14.7% (worse)
Windows MinGW ARM64 ResetHeap1024/Go 31.050 ns/op +0.05 ns/op / +0.2% (worse)
Windows MinGW ARM64 ResetHeap1024/LLGo 112.500 ns/op +2.9 ns/op / +2.6% (worse)
Windows MSVC AfterFuncZeroDelivery/Go 466.100 ns/op -12.2 ns/op / -2.6% (better)
Windows MSVC AfterFuncZeroDelivery/LLGo 137482 ns/op -2653 ns/op / -1.9% (better)
Windows MSVC CreateStop/Go 115.300 ns/op -0.5 ns/op / -0.4% (better)
Windows MSVC CreateStop/LLGo 457.900 ns/op +58 ns/op / +14.5% (worse)
Windows MSVC RearmStopped/Go 31.500 ns/op -0.04 ns/op / -0.1% (better)
Windows MSVC RearmStopped/LLGo 241.500 ns/op -2.1 ns/op / -0.9% (better)
Windows MSVC ResetActive/Go 19.090 ns/op +0.01 ns/op / +0.1% (worse)
Windows MSVC ResetActive/LLGo 157.400 ns/op -4.4 ns/op / -2.7% (better)
Windows MSVC ResetHeap1024/Go 19.090 ns/op -0.03 ns/op / -0.2% (better)
Windows MSVC ResetHeap1024/LLGo 124.500 ns/op +1.6 ns/op / +1.3% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/Go 981.500 ns/op -26.5 ns/op / -2.6% (better)
Windows MSVC 386 AfterFuncZeroDelivery/LLGo 166649 ns/op -114 ns/op / -0.1% (better)
Windows MSVC 386 CreateStop/Go 217.100 ns/op +0.9 ns/op / +0.4% (worse)
Windows MSVC 386 CreateStop/LLGo 477.500 ns/op +6.4 ns/op / +1.4% (worse)
Windows MSVC 386 RearmStopped/Go 72.940 ns/op -0.37 ns/op / -0.5% (better)
Windows MSVC 386 RearmStopped/LLGo 323.400 ns/op +6.3 ns/op / +2.0% (worse)
Windows MSVC 386 ResetActive/Go 41.990 ns/op -0.07 ns/op / -0.2% (better)
Windows MSVC 386 ResetActive/LLGo 283.300 ns/op -717.7 ns/op / -71.7% (better)
Windows MSVC 386 ResetHeap1024/Go 42.320 ns/op -0.06 ns/op / -0.1% (better)
Windows MSVC 386 ResetHeap1024/LLGo 172.700 ns/op -1.5 ns/op / -0.9% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/Go 668.700 ns/op -11.5 ns/op / -1.7% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/LLGo 145578 ns/op -4906 ns/op / -3.3% (better)
Windows MSVC ARM64 CreateStop/Go 210.900 ns/op +11.5 ns/op / +5.8% (worse)
Windows MSVC ARM64 CreateStop/LLGo 334.900 ns/op -17.2 ns/op / -4.9% (better)
Windows MSVC ARM64 RearmStopped/Go 70.560 ns/op +0.01 ns/op / +0.01417% (worse)
Windows MSVC ARM64 RearmStopped/LLGo 223 ns/op -1.5 ns/op / -0.7% (better)
Windows MSVC ARM64 ResetActive/Go 31.110 ns/op +0.02 ns/op / +0.1% (worse)
Windows MSVC ARM64 ResetActive/LLGo 107.100 ns/op -2.2 ns/op / -2.0% (better)
Windows MSVC ARM64 ResetHeap1024/Go 31.130 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 ResetHeap1024/LLGo 117.800 ns/op +2.3 ns/op / +2.0% (worse)

Compared with 45bdf2db295a measured in the same runner job.

@cpunion cpunion closed this Oct 14, 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.

1 participant