Skip to content

wasm: fix reflected method calls and optimized Asyncify exports - #2720

Open
cpunion wants to merge 10 commits into
xgo-dev:mainfrom
cpunion:codex/fix-size-wasm-correctness-2679-20261003
Open

cpunion wants to merge 10 commits into
xgo-dev:mainfrom
cpunion:codex/fix-size-wasm-correctness-2679-20261003

Conversation

@cpunion

@cpunion cpunion commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Calling a reflected method through Value.Method[ByName]().Interface() can miss the typed Wasm bridge and trap. Recognize direct, bound and interface-held method-value paths, including interfaces returning an alias of reflect.Value, while keeping reflect.Type metadata inspection free of these bridges.

Restore the requested Emscripten O3/Os/Oz link level. A preRun binding keeps Asyncify's control exports visible to MetaDCE while preserving public Module exports and user hooks. Declare native EH capabilities, preserve pthread features, and include EMCC_CFLAGS in package fingerprints.

Add independent reflected method-value executables, native result-oracle tests and optimized Node/Chrome acceptance cases. Also clean up Chrome child processes, allow creator-thread teardown in the Windows GC smoke, and retain signal-termination diagnostics for coverage-enabled tests.

Part of #2679.

Validation: compiler/cache tests; the complete macOS LLVM 22 LLGo core suite with atomic coverage; both reflected method fixtures under native Go, LLGo and Wasmer; Node Asyncify and browser-process tests; CI workflow tests. Optimized Node/Chrome O3/Os/Oz callback, C ABI/EH, filesystem and multi-worker cases were also validated during development and are enforced in CI.

@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: WASM reflect correctness + Emscripten link-level fix

Solid, well-scoped change. The signature-based bridge detection (distinguishing reflect.Value.Method from reflect.Type.Method) addresses the root cause of #2679 directly rather than masking it, and replacing the opaque O3/Os/Oz→O2 link-level downgrade with an explicit --pre-js shim restores the user-requested optimization level while keeping Asyncify correctness. Test coverage is strong across method-value vs. type-metadata, dead-code pruning, bound-method escape, and interface-held reflect.Value cases.

Findings are documentation-accuracy only; no correctness or security blockers were found. The security pass flagged no medium-or-above issues (the --pre-js shim is safe against prototype pollution, and test/wasm/optimization/test.py has no shell/subprocess injection exposure).

Comment thread internal/build/wasm_reflect.go

@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 (addendum): shim comment accuracy

One documentation-accuracy finding on the new Asyncify shim (see inline).

Comment thread targets/emscripten-asyncify-exports.js Outdated
@codecov

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

LLGo WebAssembly build benchmarks

f7d01915c3b6 | 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 -4953 B / -3.2% (better) 88157 B -585 B / -0.7% (better)
cprintf/j32-goos-js/LLGo 148511 B -3784 B / -2.5% (better) 72985 B -180 B / -0.2% (better)
cprintf/j64-emscripten-memory64/LLGo 136707 B -4541 B / -3.2% (better) 91328 B -1302 B / -1.4% (better)
cprintf/w32-goos-wasip1/LLGo 152848 B 0 B / +0.0% 0 B 0 B / 0.0%
cprintf/w32-wasi/LLGo 153560 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/j32-emscripten/LLGo 3049075 B -164486 B / -5.1% (better) 130373 B -2069 B / -1.6% (better)
fmtprintf/j32-goos-js/Go 2526852 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/j32-goos-js/LLGo 3145106 B -47554 B / -1.5% (better) 100773 B -862 B / -0.8% (better)
fmtprintf/j64-emscripten-memory64/LLGo 2811792 B -138376 B / -4.7% (better) 135853 B -3432 B / -2.5% (better)
fmtprintf/w32-goos-wasip1/Go 2500019 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/w32-goos-wasip1/LLGo 2347479 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/w32-wasi/LLGo 2344141 B 0 B / +0.0% 0 B 0 B / 0.0%
j32-emscripten/LLGo 148582 B -4846 B / -3.2% (better) 88157 B -585 B / -0.7% (better)
j32-goos-js/Go 1895533 B 0 B / +0.0% 0 B 0 B / 0.0%
j32-goos-js/LLGo 148002 B -3766 B / -2.5% (better) 72985 B -180 B / -0.2% (better)
j64-emscripten-memory64/LLGo 136047 B -4535 B / -3.2% (better) 91328 B -1302 B / -1.4% (better)
reflectcall/j32-emscripten/LLGo 1473192 B -70706 B / -4.6% (better) 104917 B -991 B / -0.9% (better)
reflectcall/j32-goos-js/Go 2191221 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/j32-goos-js/LLGo 1523137 B -23234 B / -1.5% (better) 89743 B -588 B / -0.7% (better)
reflectcall/j64-emscripten-memory64/LLGo 1365961 B -62609 B / -4.4% (better) 109492 B -2149 B / -1.9% (better)
reflectcall/w32-goos-wasip1/Go 2205707 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/w32-goos-wasip1/LLGo 1276821 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/w32-wasi/LLGo 1274429 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 152495 B 0 B / +0.0% 0 B 0 B / 0.0%
w32-wasi/LLGo 153207 B 0 B / +0.0% 0 B 0 B / 0.0%
LLGo WebAssembly build measurements
Example and profile Build vs base
j32-emscripten 7.127 s +347.2 ms / +5.1% (worse)
j32-goos-js 6.864 s +117 ms / +1.7% (worse)
j64-emscripten-memory64 6.509 s +433.4 ms / +7.1% (worse)
reflectcall/w32-wasi 23.344 s -718.3 ms / -3.0% (better)
w32-goos-wasip1 4.373 s -174.4 ms / -3.8% (better)
w32-wasi 4.163 s -387.5 ms / -8.5% (better)

Compared with 5f1f13897af7 measured in the same runner job.

@cpunion
cpunion force-pushed the codex/fix-size-wasm-correctness-2679-20261003 branch from edf8eb4 to 6dfcebe Compare October 3, 2026 05:29
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

LLGo baseline benchmarks

5c73eaf8bf8b | 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.178 s -140.4 ms / -10.6% (better) 1.354 ms -122.3 us / -8.3% (better)
Linux cprintf-lto 8408 B 0 B / +0.0% 368 B 0 B / +0.0% 1.216 s -183.6 ms / -13.1% (better) 1.453 ms -29.65 us / -2.0% (better)
Linux fmtprintf 4880952 B 0 B / +0.0% 501619 B 0 B / +0.0% 10.139 s +103.8 ms / +1.0% (worse) 3.616 ms +90.44 us / +2.6% (worse)
Linux fmtprintf-lto 3600808 B 0 B / +0.0% 438538 B 0 B / +0.0% 20.245 s +1.818 s / +9.9% (worse) 3.520 ms +328.4 us / +10.3% (worse)
Linux println 674952 B 0 B / +0.0% 16855 B 0 B / +0.0% 1.304 s -72.06 ms / -5.2% (better) 1.897 ms -80.72 us / -4.1% (better)
Linux println-lto 190024 B 0 B / +0.0% 14273 B 0 B / +0.0% 1.655 s -307.7 ms / -15.7% (better) 1.903 ms +188.9 us / +11.0% (worse)
macOS cprintf 50736 B 0 B / +0.0% 4409 B 0 B / +0.0% 969.138 ms -154.6 ms / -13.8% (better) 2.705 ms -820.4 us / -23.3% (better)
macOS cprintf-lto 50496 B 0 B / +0.0% 161 B 0 B / +0.0% 959.379 ms -355.4 ms / -27.0% (better) 2.784 ms -1.189 ms / -29.9% (better)
macOS fmtprintf 1773456 B 0 B / +0.0% 877780 B 0 B / +0.0% 4.858 s -751.2 ms / -13.4% (better) 8.203 ms -3.197 ms / -28.0% (better)
macOS fmtprintf-lto 1360928 B 0 B / +0.0% 762428 B 0 B / +0.0% 8.097 s -2.083 s / -20.5% (better) 3.523 ms -744.1 us / -17.4% (better)
macOS println 99344 B 0 B / +0.0% 24216 B 0 B / +0.0% 873.409 ms -322.7 ms / -27.0% (better) 3.559 ms -116.6 us / -3.2% (better)
macOS println-lto 83664 B 0 B / +0.0% 21457 B 0 B / +0.0% 1.067 s -343.1 ms / -24.3% (better) 3.122 ms -4.45 ms / -58.8% (better)
Windows MinGW cprintf 651264 B 0 B / +0.0% 4550 B 0 B / +0.0% 1.635 s -19.3 ms / -1.2% (better) 3.514 ms -186 us / -5.0% (better)
Windows MinGW cprintf-lto 43520 B 0 B / +0.0% 4486 B 0 B / +0.0% 1.650 s -31.64 ms / -1.9% (better) 3.539 ms +36.2 us / +1.0% (worse)
Windows MinGW fmtprintf 5432832 B 0 B / +0.0% 600310 B 0 B / +0.0% 7.284 s -32.5 ms / -0.4% (better) 7.983 ms -123.9 us / -1.5% (better)
Windows MinGW fmtprintf-lto 4127232 B 0 B / +0.0% 546582 B 0 B / +0.0% 14.702 s +20.8 ms / +0.1% (worse) 9.780 ms +1.954 ms / +25.0% (worse)
Windows MinGW println 706560 B 0 B / +0.0% 25190 B 0 B / +0.0% 1.638 s -28.81 ms / -1.7% (better) 6.408 ms +8 us / +0.1% (worse)
Windows MinGW println-lto 208896 B 0 B / +0.0% 22054 B 0 B / +0.0% 1.929 s +1.185 ms / +0.1% (worse) 6.279 ms -386.6 us / -5.8% (better)
Windows MinGW 386 cprintf 601600 B 0 B / +0.0% 5326 B 0 B / +0.0% 1.758 s +69.27 ms / +4.1% (worse) 5.139 ms -618.8 us / -10.7% (better)
Windows MinGW 386 cprintf-lto 103424 B 0 B / +0.0% 5094 B 0 B / +0.0% 1.766 s +50.73 ms / +3.0% (worse) 4.948 ms -570.3 us / -10.3% (better)
Windows MinGW 386 fmtprintf 4745216 B 0 B / +0.0% 472478 B 0 B / +0.0% 7.378 s -119.9 ms / -1.6% (better) 10.934 ms +694.7 us / +6.8% (worse)
Windows MinGW 386 fmtprintf-lto 4148736 B 0 B / +0.0% 451114 B 0 B / +0.0% 14.322 s -155 ms / -1.1% (better) 10.160 ms -381.1 us / -3.6% (better)
Windows MinGW 386 println 653312 B 0 B / +0.0% 21490 B 0 B / +0.0% 1.692 s +2.256 ms / +0.1% (worse) 8.504 ms -651.2 us / -7.1% (better)
Windows MinGW 386 println-lto 258560 B 0 B / +0.0% 19306 B 0 B / +0.0% 1.962 s -12.14 ms / -0.6% (better) 8.556 ms -840.9 us / -8.9% (better)
Windows MinGW ARM64 cprintf 661504 B 0 B / +0.0% 4408 B 0 B / +0.0% 2.014 s -123 ms / -5.8% (better) 6.898 ms -787.6 us / -10.2% (better)
Windows MinGW ARM64 cprintf-lto 43520 B 0 B / +0.0% 4340 B 0 B / +0.0% 2.057 s -101.3 ms / -4.7% (better) 7.625 ms -597.2 us / -7.3% (better)
Windows MinGW ARM64 fmtprintf 5343744 B 0 B / +0.0% 510876 B 0 B / +0.0% 7.831 s +352.7 ms / +4.7% (worse) 16.048 ms +1.988 ms / +14.1% (worse)
Windows MinGW ARM64 fmtprintf-lto 4302336 B 0 B / +0.0% 477264 B 0 B / +0.0% 14.736 s -196.2 ms / -1.3% (better) 16.050 ms +1.81 ms / +12.7% (worse)
Windows MinGW ARM64 println 714240 B 0 B / +0.0% 23884 B 0 B / +0.0% 2.010 s -7.292 ms / -0.4% (better) 12.104 ms +58.9 us / +0.5% (worse)
Windows MinGW ARM64 println-lto 215552 B 0 B / +0.0% 21232 B 0 B / +0.0% 2.344 s +97.56 ms / +4.3% (worse) 13.487 ms +1.332 ms / +11.0% (worse)
Windows MSVC cprintf 893952 B 0 B / +0.0% 65798 B 0 B / +0.0% 1.770 s +164.1 ms / +10.2% (worse) 2.759 ms -593.9 us / -17.7% (better)
Windows MSVC cprintf-lto 289792 B 0 B / +0.0% 65734 B 0 B / +0.0% 1.609 s -220.1 ms / -12.0% (better) 3.514 ms +29.9 us / +0.9% (worse)
Windows MSVC fmtprintf 5732864 B 0 B / +0.0% 695862 B 0 B / +0.0% 7.251 s +106.7 ms / +1.5% (worse) 10.424 ms +1.685 ms / +19.3% (worse)
Windows MSVC fmtprintf-lto 4449792 B 0 B / +0.0% 646134 B 0 B / +0.0% 14.615 s +516.1 ms / +3.7% (worse) 9.838 ms +651.8 us / +7.1% (worse)
Windows MSVC println 1017344 B 0 B / +0.0% 120854 B 0 B / +0.0% 1.809 s +212 ms / +13.3% (worse) 7.184 ms -216.6 us / -2.9% (better)
Windows MSVC println-lto 528384 B 0 B / +0.0% 118390 B 0 B / +0.0% 2.092 s +168 ms / +8.7% (worse) 8.722 ms +877.4 us / +11.2% (worse)
Windows MSVC 386 cprintf 513536 B 0 B / +0.0% 3931 B 0 B / +0.0% 1.504 s -20.69 ms / -1.4% (better) 5.053 ms -826 us / -14.1% (better)
Windows MSVC 386 cprintf-lto 44032 B 0 B / +0.0% 3853 B 0 B / +0.0% 1.550 s +12.14 ms / +0.8% (worse) 5.725 ms +25 us / +0.4% (worse)
Windows MSVC 386 fmtprintf 4479488 B 0 B / +0.0% 455868 B 0 B / +0.0% 7.164 s +47.56 ms / +0.7% (worse) 11.232 ms -54 us / -0.5% (better)
Windows MSVC 386 fmtprintf-lto 3899392 B 0 B / +0.0% 426651 B 0 B / +0.0% 13.857 s +446.6 ms / +3.3% (worse) 12.490 ms +1.242 ms / +11.0% (worse)
Windows MSVC 386 println 567296 B 0 B / +0.0% 20340 B 0 B / +0.0% 1.558 s +28.75 ms / +1.9% (worse) 9.460 ms -628.8 us / -6.2% (better)
Windows MSVC 386 println-lto 199168 B 0 B / +0.0% 18501 B 0 B / +0.0% 1.793 s +19.32 ms / +1.1% (worse) 9.141 ms -798.3 us / -8.0% (better)
Windows MSVC ARM64 cprintf 662528 B 0 B / +0.0% 4192 B 0 B / +0.0% 1.708 s +16.74 ms / +1.0% (worse) 7.510 ms -4.8 us / -0.1% (better)
Windows MSVC ARM64 cprintf-lto 47616 B 0 B / +0.0% 4084 B 0 B / +0.0% 1.728 s +22.84 ms / +1.3% (worse) 8.033 ms +134.6 us / +1.7% (worse)
Windows MSVC ARM64 fmtprintf 5339648 B 0 B / +0.0% 510808 B 0 B / +0.0% 7.052 s +80.23 ms / +1.2% (worse) 15.355 ms +596 us / +4.0% (worse)
Windows MSVC ARM64 fmtprintf-lto 4309504 B 0 B / +0.0% 477924 B 0 B / +0.0% 13.529 s +200 ms / +1.5% (worse) 15.059 ms -404.5 us / -2.6% (better)
Windows MSVC ARM64 println 715264 B 0 B / +0.0% 23908 B 0 B / +0.0% 1.699 s +7.999 ms / +0.5% (worse) 13.297 ms -206.9 us / -1.5% (better)
Windows MSVC ARM64 println-lto 220672 B 0 B / +0.0% 21380 B 0 B / +0.0% 1.938 s +21.55 ms / +1.1% (worse) 13.171 ms +125.5 us / +1.0% (worse)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 14.710 ns/op -0.04 ns/op / -0.3% (better)
Linux BenchmarkMergeCompilerFlags 209 ns/op +2.4 ns/op / +1.2% (worse)
Linux BenchmarkMergeLinkerFlags 136.600 ns/op -4.2 ns/op / -3.0% (better)
Linux BenchmarkChannelBuffered 55.270 ns/op +0.1 ns/op / +0.2% (worse)
Linux BenchmarkChannelHandoff 12543 ns/op -3170 ns/op / -20.2% (better)
Linux BenchmarkDefer 54.960 ns/op +4.09 ns/op / +8.0% (worse)
Linux BenchmarkDirectCall 1.168 ns/op -0.002 ns/op / -0.2% (better)
Linux BenchmarkGlobalRead 1.177 ns/op +0.004 ns/op / +0.3% (worse)
Linux BenchmarkGlobalWrite 7.764 ns/op -0.006 ns/op / -0.1% (better)
Linux BenchmarkGoroutine 27466 ns/op -2109 ns/op / -7.1% (better)
Linux BenchmarkInterfaceCall 5.946 ns/op +0.116 ns/op / +2.0% (worse)
Linux BenchmarkRuntimeGetG 2.982 ns/op +0.049 ns/op / +1.7% (worse)
macOS BenchmarkLookupPCRandom 12.910 ns/op +0.34 ns/op / +2.7% (worse)
macOS BenchmarkMergeCompilerFlags 90.490 ns/op -18.91 ns/op / -17.3% (better)
macOS BenchmarkMergeLinkerFlags 65.810 ns/op -2.22 ns/op / -3.3% (better)
macOS BenchmarkChannelBuffered 23.190 ns/op -3.27 ns/op / -12.4% (better)
macOS BenchmarkChannelHandoff 6599 ns/op +847 ns/op / +14.7% (worse)
macOS BenchmarkDefer 32.700 ns/op -1.63 ns/op / -4.7% (better)
macOS BenchmarkDirectCall 0.983 ns/op -0.078 ns/op / -7.4% (better)
macOS BenchmarkGlobalRead 0.981 ns/op -0.1746 ns/op / -15.1% (better)
macOS BenchmarkGlobalWrite 0.979 ns/op -0.0775 ns/op / -7.3% (better)
macOS BenchmarkGoroutine 37756 ns/op -31010 ns/op / -45.1% (better)
macOS BenchmarkInterfaceCall 3.604 ns/op -0.466 ns/op / -11.4% (better)
macOS BenchmarkRuntimeGetG 1.960 ns/op -0.578 ns/op / -22.8% (better)
Windows MinGW BenchmarkLookupPCRandom 13.070 ns/op -0.2 ns/op / -1.5% (better)
Windows MinGW BenchmarkMergeCompilerFlags 637.200 ns/op +15.2 ns/op / +2.4% (worse)
Windows MinGW BenchmarkMergeLinkerFlags 556.100 ns/op -16.4 ns/op / -2.9% (better)
Windows MinGW BenchmarkChannelBuffered 31.330 ns/op +0.35 ns/op / +1.1% (worse)
Windows MinGW BenchmarkChannelHandoff 988.600 ns/op +143.1 ns/op / +16.9% (worse)
Windows MinGW BenchmarkDefer 58.700 ns/op +0.04 ns/op / +0.1% (worse)
Windows MinGW BenchmarkDirectCall 1.549 ns/op +0.002 ns/op / +0.1% (worse)
Windows MinGW BenchmarkGlobalRead 1.547 ns/op -0.005 ns/op / -0.3% (better)
Windows MinGW BenchmarkGlobalWrite 2.473 ns/op +0.004 ns/op / +0.2% (worse)
Windows MinGW BenchmarkGoroutine 92063 ns/op +2605 ns/op / +2.9% (worse)
Windows MinGW BenchmarkInterfaceCall 8.384 ns/op -0.023 ns/op / -0.3% (better)
Windows MinGW BenchmarkRuntimeGetG 2.479 ns/op 0 ns/op / +0.0%
Windows MinGW 386 BenchmarkLookupPCRandom 26.540 ns/op -0.04 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkMergeCompilerFlags 756.700 ns/op +44.7 ns/op / +6.3% (worse)
Windows MinGW 386 BenchmarkMergeLinkerFlags 693.500 ns/op +26.1 ns/op / +3.9% (worse)
Windows MinGW 386 BenchmarkChannelBuffered 41.120 ns/op -0.23 ns/op / -0.6% (better)
Windows MinGW 386 BenchmarkChannelHandoff 922.600 ns/op +49.1 ns/op / +5.6% (worse)
Windows MinGW 386 BenchmarkDefer 42.320 ns/op -0.84 ns/op / -1.9% (better)
Windows MinGW 386 BenchmarkDirectCall 1.549 ns/op +0.001 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkGlobalRead 1.550 ns/op -0.002 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkGlobalWrite 7.791 ns/op +0.011 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkGoroutine 107427 ns/op +4063 ns/op / +3.9% (worse)
Windows MinGW 386 BenchmarkInterfaceCall 8.378 ns/op -0.005 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkRuntimeGetG 1.929 ns/op +0.001 ns/op / +0.1% (worse)
Windows MinGW ARM64 BenchmarkLookupPCRandom 12.070 ns/op +0.02 ns/op / +0.2% (worse)
Windows MinGW ARM64 BenchmarkMergeCompilerFlags 583.500 ns/op -3 ns/op / -0.5% (better)
Windows MinGW ARM64 BenchmarkMergeLinkerFlags 547.500 ns/op -7.8 ns/op / -1.4% (better)
Windows MinGW ARM64 BenchmarkChannelBuffered 39.480 ns/op +1.94 ns/op / +5.2% (worse)
Windows MinGW ARM64 BenchmarkChannelHandoff 2114 ns/op +217 ns/op / +11.4% (worse)
Windows MinGW ARM64 BenchmarkDefer 60.740 ns/op +1.06 ns/op / +1.8% (worse)
Windows MinGW ARM64 BenchmarkDirectCall 0.663 ns/op -0.0001 ns/op / -0.01507% (better)
Windows MinGW ARM64 BenchmarkGlobalRead 0.663 ns/op 0 ns/op / +0.0%
Windows MinGW ARM64 BenchmarkGlobalWrite 0.737 ns/op +0.0002 ns/op / +0.02714% (worse)
Windows MinGW ARM64 BenchmarkGoroutine 65791 ns/op -2819 ns/op / -4.1% (better)
Windows MinGW ARM64 BenchmarkInterfaceCall 4.138 ns/op -0.004 ns/op / -0.1% (better)
Windows MinGW ARM64 BenchmarkRuntimeGetG 1.769 ns/op 0 ns/op / +0.0%
Windows MSVC BenchmarkLookupPCRandom 12.960 ns/op -0.31 ns/op / -2.3% (better)
Windows MSVC BenchmarkMergeCompilerFlags 659.900 ns/op +25.9 ns/op / +4.1% (worse)
Windows MSVC BenchmarkMergeLinkerFlags 574.200 ns/op +21.5 ns/op / +3.9% (worse)
Windows MSVC BenchmarkChannelBuffered 29.590 ns/op -0.08 ns/op / -0.3% (better)
Windows MSVC BenchmarkChannelHandoff 1146 ns/op +124 ns/op / +12.1% (worse)
Windows MSVC BenchmarkDefer 55.580 ns/op +2.09 ns/op / +3.9% (worse)
Windows MSVC BenchmarkDirectCall 1.547 ns/op -0.003 ns/op / -0.2% (better)
Windows MSVC BenchmarkGlobalRead 1.555 ns/op +0.008 ns/op / +0.5% (worse)
Windows MSVC BenchmarkGlobalWrite 2.469 ns/op +0.004 ns/op / +0.2% (worse)
Windows MSVC BenchmarkGoroutine 92211 ns/op +1125 ns/op / +1.2% (worse)
Windows MSVC BenchmarkInterfaceCall 8.989 ns/op +0.007 ns/op / +0.1% (worse)
Windows MSVC BenchmarkRuntimeGetG 2.504 ns/op +0.024 ns/op / +1.0% (worse)
Windows MSVC 386 BenchmarkLookupPCRandom 26.550 ns/op -0.13 ns/op / -0.5% (better)
Windows MSVC 386 BenchmarkMergeCompilerFlags 788 ns/op +32.8 ns/op / +4.3% (worse)
Windows MSVC 386 BenchmarkMergeLinkerFlags 698.500 ns/op +35.2 ns/op / +5.3% (worse)
Windows MSVC 386 BenchmarkChannelBuffered 38.710 ns/op -0.06 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkChannelHandoff 920.400 ns/op +68.7 ns/op / +8.1% (worse)
Windows MSVC 386 BenchmarkDefer 45.160 ns/op -2.69 ns/op / -5.6% (better)
Windows MSVC 386 BenchmarkDirectCall 1.553 ns/op +0.003 ns/op / +0.2% (worse)
Windows MSVC 386 BenchmarkGlobalRead 1.551 ns/op +0.001 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkGlobalWrite 7.778 ns/op -0.001 ns/op / -0.01286% (better)
Windows MSVC 386 BenchmarkGoroutine 107691 ns/op +2273 ns/op / +2.2% (worse)
Windows MSVC 386 BenchmarkInterfaceCall 8.400 ns/op +0.024 ns/op / +0.3% (worse)
Windows MSVC 386 BenchmarkRuntimeGetG 2.169 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkLookupPCRandom 12.140 ns/op -0.02 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkMergeCompilerFlags 595.300 ns/op +17.4 ns/op / +3.0% (worse)
Windows MSVC ARM64 BenchmarkMergeLinkerFlags 577.500 ns/op +35.9 ns/op / +6.6% (worse)
Windows MSVC ARM64 BenchmarkChannelBuffered 38.580 ns/op +1.02 ns/op / +2.7% (worse)
Windows MSVC ARM64 BenchmarkChannelHandoff 3591 ns/op +474 ns/op / +15.2% (worse)
Windows MSVC ARM64 BenchmarkDefer 61.740 ns/op -1.89 ns/op / -3.0% (better)
Windows MSVC ARM64 BenchmarkDirectCall 0.663 ns/op +0.0002 ns/op / +0.03016% (worse)
Windows MSVC ARM64 BenchmarkGlobalRead 0.663 ns/op -0.0001 ns/op / -0.01507% (better)
Windows MSVC ARM64 BenchmarkGlobalWrite 3.795 ns/op -0.001 ns/op / -0.02634% (better)
Windows MSVC ARM64 BenchmarkGoroutine 58068 ns/op -3524 ns/op / -5.7% (better)
Windows MSVC ARM64 BenchmarkInterfaceCall 4.141 ns/op -0.007 ns/op / -0.2% (better)
Windows MSVC ARM64 BenchmarkRuntimeGetG 1.800 ns/op +0.028 ns/op / +1.6% (worse)
Timer runtime benchmarks
Platform Operation and runtime ns/op vs base
Linux AfterFuncZeroDelivery/Go 932.200 ns/op -32.3 ns/op / -3.3% (better)
Linux AfterFuncZeroDelivery/LLGo 39053 ns/op +531 ns/op / +1.4% (worse)
Linux CreateStop/Go 307.900 ns/op +0.8 ns/op / +0.3% (worse)
Linux CreateStop/LLGo 1938 ns/op -71 ns/op / -3.5% (better)
Linux RearmStopped/Go 114.800 ns/op -1.4 ns/op / -1.2% (better)
Linux RearmStopped/LLGo 1376 ns/op -77 ns/op / -5.3% (better)
Linux ResetActive/Go 67.610 ns/op -1.03 ns/op / -1.5% (better)
Linux ResetActive/LLGo 817.900 ns/op +25 ns/op / +3.2% (worse)
Linux ResetHeap1024/Go 67.070 ns/op +0.01 ns/op / +0.01491% (worse)
Linux ResetHeap1024/LLGo 177.600 ns/op -7.8 ns/op / -4.2% (better)
macOS AfterFuncZeroDelivery/Go 383.600 ns/op -70.4 ns/op / -15.5% (better)
macOS AfterFuncZeroDelivery/LLGo 69329 ns/op -4828 ns/op / -6.5% (better)
macOS CreateStop/Go 137.700 ns/op -8.6 ns/op / -5.9% (better)
macOS CreateStop/LLGo 423.300 ns/op -79.1 ns/op / -15.7% (better)
macOS RearmStopped/Go 52.980 ns/op -5.79 ns/op / -9.9% (better)
macOS RearmStopped/LLGo 335.600 ns/op -20.4 ns/op / -5.7% (better)
macOS ResetActive/Go 38.980 ns/op -7.01 ns/op / -15.2% (better)
macOS ResetActive/LLGo 164.200 ns/op -7 ns/op / -4.1% (better)
macOS ResetHeap1024/Go 38.930 ns/op -6.02 ns/op / -13.4% (better)
macOS ResetHeap1024/LLGo 79.030 ns/op -6.51 ns/op / -7.6% (better)
Windows MinGW AfterFuncZeroDelivery/Go 571 ns/op +13.3 ns/op / +2.4% (worse)
Windows MinGW AfterFuncZeroDelivery/LLGo 180187 ns/op +826 ns/op / +0.5% (worse)
Windows MinGW CreateStop/Go 116.100 ns/op -10.1 ns/op / -8.0% (better)
Windows MinGW CreateStop/LLGo 426 ns/op -218 ns/op / -33.9% (better)
Windows MinGW RearmStopped/Go 31.360 ns/op -3.17 ns/op / -9.2% (better)
Windows MinGW RearmStopped/LLGo 277.600 ns/op -2.5 ns/op / -0.9% (better)
Windows MinGW ResetActive/Go 20.110 ns/op -1.23 ns/op / -5.8% (better)
Windows MinGW ResetActive/LLGo 168 ns/op +10.5 ns/op / +6.7% (worse)
Windows MinGW ResetHeap1024/Go 20.500 ns/op -0.39 ns/op / -1.9% (better)
Windows MinGW ResetHeap1024/LLGo 127 ns/op 0 ns/op / +0.0%
Windows MinGW 386 AfterFuncZeroDelivery/Go 959.900 ns/op -2 ns/op / -0.2% (better)
Windows MinGW 386 AfterFuncZeroDelivery/LLGo 197680 ns/op +1324 ns/op / +0.7% (worse)
Windows MinGW 386 CreateStop/Go 190.500 ns/op -1.1 ns/op / -0.6% (better)
Windows MinGW 386 CreateStop/LLGo 515.600 ns/op +11.4 ns/op / +2.3% (worse)
Windows MinGW 386 RearmStopped/Go 63.230 ns/op +0.01 ns/op / +0.01582% (worse)
Windows MinGW 386 RearmStopped/LLGo 354.300 ns/op -3.2 ns/op / -0.9% (better)
Windows MinGW 386 ResetActive/Go 38.910 ns/op 0 ns/op / +0.0%
Windows MinGW 386 ResetActive/LLGo 996.600 ns/op -2.7 ns/op / -0.3% (better)
Windows MinGW 386 ResetHeap1024/Go 39.400 ns/op -0.03 ns/op / -0.1% (better)
Windows MinGW 386 ResetHeap1024/LLGo 189.400 ns/op +1.8 ns/op / +1.0% (worse)
Windows MinGW ARM64 AfterFuncZeroDelivery/Go 667.100 ns/op -2.6 ns/op / -0.4% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/LLGo 163702 ns/op +2502 ns/op / +1.6% (worse)
Windows MinGW ARM64 CreateStop/Go 213.700 ns/op +14 ns/op / +7.0% (worse)
Windows MinGW ARM64 CreateStop/LLGo 407.700 ns/op -9.9 ns/op / -2.4% (better)
Windows MinGW ARM64 RearmStopped/Go 70.640 ns/op -0.01 ns/op / -0.01415% (better)
Windows MinGW ARM64 RearmStopped/LLGo 259.600 ns/op +1.2 ns/op / +0.5% (worse)
Windows MinGW ARM64 ResetActive/Go 31.100 ns/op -0.12 ns/op / -0.4% (better)
Windows MinGW ARM64 ResetActive/LLGo 136.500 ns/op -5 ns/op / -3.5% (better)
Windows MinGW ARM64 ResetHeap1024/Go 31.160 ns/op -0.05 ns/op / -0.2% (better)
Windows MinGW ARM64 ResetHeap1024/LLGo 126.700 ns/op +1 ns/op / +0.8% (worse)
Windows MSVC AfterFuncZeroDelivery/Go 581.100 ns/op +28.5 ns/op / +5.2% (worse)
Windows MSVC AfterFuncZeroDelivery/LLGo 177312 ns/op +4243 ns/op / +2.5% (worse)
Windows MSVC CreateStop/Go 121.800 ns/op +3.6 ns/op / +3.0% (worse)
Windows MSVC CreateStop/LLGo 413 ns/op -3.4 ns/op / -0.8% (better)
Windows MSVC RearmStopped/Go 33.130 ns/op +1.56 ns/op / +4.9% (worse)
Windows MSVC RearmStopped/LLGo 250.300 ns/op -9.7 ns/op / -3.7% (better)
Windows MSVC ResetActive/Go 20.710 ns/op +0.61 ns/op / +3.0% (worse)
Windows MSVC ResetActive/LLGo 171 ns/op +10.4 ns/op / +6.5% (worse)
Windows MSVC ResetHeap1024/Go 21 ns/op +0.54 ns/op / +2.6% (worse)
Windows MSVC ResetHeap1024/LLGo 123.800 ns/op -0.5 ns/op / -0.4% (better)
Windows MSVC 386 AfterFuncZeroDelivery/Go 948.500 ns/op +6.7 ns/op / +0.7% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/LLGo 199585 ns/op -4713 ns/op / -2.3% (better)
Windows MSVC 386 CreateStop/Go 193.200 ns/op +2.4 ns/op / +1.3% (worse)
Windows MSVC 386 CreateStop/LLGo 479 ns/op +13 ns/op / +2.8% (worse)
Windows MSVC 386 RearmStopped/Go 63.380 ns/op -0.11 ns/op / -0.2% (better)
Windows MSVC 386 RearmStopped/LLGo 320.700 ns/op +9.6 ns/op / +3.1% (worse)
Windows MSVC 386 ResetActive/Go 38.920 ns/op -0.1 ns/op / -0.3% (better)
Windows MSVC 386 ResetActive/LLGo 901.100 ns/op -6.2 ns/op / -0.7% (better)
Windows MSVC 386 ResetHeap1024/Go 39.430 ns/op +0.03 ns/op / +0.1% (worse)
Windows MSVC 386 ResetHeap1024/LLGo 168.700 ns/op -2.5 ns/op / -1.5% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/Go 667.700 ns/op +6.6 ns/op / +1.0% (worse)
Windows MSVC ARM64 AfterFuncZeroDelivery/LLGo 170875 ns/op -6889 ns/op / -3.9% (better)
Windows MSVC ARM64 CreateStop/Go 197.800 ns/op +3.2 ns/op / +1.6% (worse)
Windows MSVC ARM64 CreateStop/LLGo 387.900 ns/op -1.2 ns/op / -0.3% (better)
Windows MSVC ARM64 RearmStopped/Go 70.570 ns/op +0.04 ns/op / +0.1% (worse)
Windows MSVC ARM64 RearmStopped/LLGo 272.700 ns/op +3.1 ns/op / +1.1% (worse)
Windows MSVC ARM64 ResetActive/Go 31.080 ns/op +0.07 ns/op / +0.2% (worse)
Windows MSVC ARM64 ResetActive/LLGo 131 ns/op -1.2 ns/op / -0.9% (better)
Windows MSVC ARM64 ResetHeap1024/Go 31.070 ns/op -0.1 ns/op / -0.3% (better)
Windows MSVC ARM64 ResetHeap1024/LLGo 139.500 ns/op +2.1 ns/op / +1.5% (worse)

Compared with 783ec4fd3d57 measured in the same runner job.

Comment thread internal/build/wasm_reflect.go Outdated
@cpunion
cpunion force-pushed the codex/fix-size-wasm-correctness-2679-20261003 branch from 5c73eaf to f7d0191 Compare October 4, 2026 06:47
@cpunion
cpunion force-pushed the codex/fix-size-wasm-correctness-2679-20261003 branch from f7d0191 to 3976fa3 Compare October 4, 2026 15:01
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.

2 participants