Skip to content

[WASM W2-A] Complete host integration and reflection - #2579

Closed
cpunion wants to merge 49 commits into
xgo-dev:mainfrom
cpunion:codex/wasm-w2-host-reflect-20260913
Closed

cpunion wants to merge 49 commits into
xgo-dev:mainfrom
cpunion:codex/wasm-w2-host-reflect-20260913

Conversation

@cpunion

@cpunion cpunion commented Sep 13, 2026 •

Copy link
Copy Markdown
Collaborator

Tracks #2152. Stacked on #2578; review this PR's 33-commit W2-A range after W1.

This combines the JavaScript-host and reflection layers because they share the host-call boundary and backend selection. It deliberately excludes scheduler/GC/standard-library completeness (W2-B) and broad acceptance (W3).

Scope

  • Preserve JavaScript exceptions, embedded NUL strings and method names, invalid constructor behavior, synchronous callback continuations, heap growth, process exit, and asynchronous filesystem operations across the JavaScript host boundary.
  • Reuse GOROOT syscall/js semantics for J32/GoJS (wasm32 with the Go-compatible JavaScript host), while retaining the Emscripten adapters for J32/Emscripten (wasm32 with the Emscripten JavaScript host) and J64/Emscripten Memory64 (wasm64 with the Emscripten JavaScript host).
  • Run raw Go-compatible JavaScript entries through explicit Node/browser adapters and execute provider acceptance in Node and Chrome; keep W32/WASI (wasm32 with WASI Preview 1) on the standard WASI boundary.
  • Complete reflect.Value.Call, CallSlice, method expressions and values, reflect.MakeFunc, aggregate/multiple results, closures, variadics, and runtime-created FuncOf descriptors.
  • Keep JavaScript profiles on the WebAssembly libffi backend; these profiles do not emit typed bridges.
  • For W32/WASI only, generate Call_/Make_ bridges on demand when whole-program reachability finds dynamic reflection. Deduplicate them by lowered LLVM signature plus GC-root shape, use compact package-local identifiers, and include selection in cache fingerprints.
  • Preserve roots and callback buffers across reflection allocation, suspension, and Asyncify replay; symbolize WebAssembly function values by table index and emit entry metadata only when observable.

Validation

Current head is 81562bae43de, rebased onto main 3ca152e610319. The review base is 4488ff8ca9d2, the W1 foundation replayed onto that main; #2578 itself remains at 6b7350457dc8. All 33 W2-A commits are patch-equivalent in range-diff (83 files, +4,278/-369). The sole conflict in the prerequisite W1 range preserves both main's entry-block local allocation and WASM physical storage/alignment. Local focused SSA/WASM and loop-allocation regressions pass. Current-head CI, coverage, review, and benchmark results are pending; the results below describe the pre-rebase head 8a7f17a8a227.

  • Focused tests pass for ssa WebAssembly lowering and constant extraction, C-layout offsets, target/raw-profile selection, runner/output/cache behavior, and function metadata.
  • The consolidated WASM runtime gate passes every named and raw profile, including real Node and Chrome execution, host-boundary behavior, reflection mixed-result layout, and single-worker runtime checks.
  • The consolidated public llgo test command gate passes the supported J32/Emscripten, J64/Emscripten Memory64, W32/WASI, raw J32/GoJS, and raw W32/WASI matrices.
  • Codecov patch coverage is 97.58589% (check passed); the equivalent pre-consolidation host and reflection ranges each reported 100% coverage of modified coverable lines.
  • FennoAI's final re-review is LGTM with no blocking findings, and all nine review threads are resolved.
  • git diff --check passes, and the range adds no diagnostic probes, new t.Skip, TODO/FIXME markers, or temporary dependency changes.

Size and build-cost audit

The consolidated benchmark passed and measured base and head sequentially on the same runner. Relative to W1, non-reflection cprintf and empty/println modules are effectively unchanged across all profiles (0.00%-0.01%, at most 14 bytes); fmtprintf is -0.22% to +1.14%. JavaScript/Emscripten therefore pays no typed-bridge module cost, and the W32/WASI bridge cost remains demand-driven.

The apparent cross-run 6%-19% build-time increase was runner variance: the identical main base was also 11%-18% slower in the consolidated run than in the W1 run. Paired base/head ratios remain consistent with W1. The repeated W32 reflection build completes in 56.45 seconds on the constrained two-core benchmark runner; this intentionally measures the only profile that emits typed bridges. The reflection fixture sizes are 1,828,137 bytes for J32/Emscripten, 1,829,529 bytes for raw J32/GoJS, 1,651,643 bytes for J64/Emscripten Memory64, 1,849,657 bytes for W32/WASI, and 1,921,038 bytes for raw W32/WASI.

Review boundary

The intended review range is 4488ff8ca9d2..81562bae43de. It covers host/build adapters, JS runtime shims, callback/exception/memory-growth behavior, reflection/function metadata, provider-specific reflection backends, and their tests. It does not change the W1 data model or include the later scheduler/GC and broad acceptance layers.

@cpunion

cpunion commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator Author

@fennoai Please review the W2-A range fcafb8546e97..ee39c0764529. The PR consolidates the already-tested JavaScript host and reflection layers; please focus on host-boundary compatibility, provider-specific reflection backend selection, function metadata/root lifetime, cache invalidation, and whether the W32/WASI-only typed-bridge cost remains isolated from JavaScript/Emscripten profiles.

@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 W2-A host integration and reflection

This is a large, well-structured PR (163 files, ~7.5k additions) that lands the JavaScript-host boundary and reflection layers. Overall quality is high: build-tag partitioning across call_bridge_*/makefunc_* is careful, ABI/scheduler rationale is documented at the point of decision, and the Asyncify-replay boundaries in host.c/emval.cpp correctly re-fetch HEAPU8.buffer after Go-reentrant calls. Reviewed for correctness, memory safety, performance, and doc accuracy.

Findings below are non-blocking. The performance and KeepAlive items are the two most worth acting on; the rest are minor/robustness suggestions.

Verified safe (no action): reflection argument detachment deep-copies indirect args out of the transient FFI frame; result stores respect per-type alignment; conservative 4-byte wasm32 GC scanning keeps pointer bit-patterns in []uint32 slot arrays reachable; docs are unusually well-synced with code.

Comment thread internal/build/wasm_reflect.go
Comment thread runtime/_patch/syscall/js/host_llgo.go
Comment thread runtime/internal/lib/runtime/link_gojs_llgo.go Outdated
Comment thread runtime/_patch/syscall/js/host_llgo.go
Comment thread runtime/internal/lib/reflect/call_bridge_wasm.go Outdated
Comment thread ssa/reflect_bridge.go Outdated
@fennoai

fennoai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

FennoAI is processing your request, please wait a moment...

@cpunion

cpunion commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator Author

The first upstream run exposed an environment gap rather than a runtime failure: the xgo-dev qiniu runner does not preinstall Chrome, while the fork runner used by the component PR did. Commit 64254ffc8 now installs Chrome for Testing (and Linux dependencies) only for the runtime suite and passes its absolute path to the existing browser acceptance script. Missing browser support remains a hard failure; test-command and the product code are unchanged. Local actionlint and git diff --check pass.

@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 W2-A host integration and reflection

Reviewed the W2-A range fcafb8546e97..ee39c0764529 across code quality, performance, security, and documentation accuracy.

Overall this is high-quality, well-tested work. The core design concerns you called out hold up under review:

  • Provider isolation is correct. Typed Call_/Make_ bridges are gated on WasmProvider == "wasi" (wasm_reflect.go:40-41) and the usesWasmReflectBridges() double-check at ssa/target.go, so JS/GoJS and Emscripten profiles emit no typed bridges and stay on the libffi backend. The build-tag split (functype_wasm_bridge.go vs functype_default.go) reinforces this.
  • Cache invalidation is sound. Both WasmReflectBridges and WasmFuncInfoEntries flow into commonSection and the fingerprint empty() check, so per-package cache entries invalidate when the reachability decision flips (covered by the fingerprint tests).
  • Host-boundary memory safety is careful. host.c/emval.cpp re-derive memory views after any growth-capable call, embedded-NUL strings pass explicit byte lengths, Asyncify replay saves/clears call-stack state to avoid re-running JS side effects, and emval handle lifetime is anchored to a finalizer-backed gcPtr copied alongside every Value. No memory-corruption or root-lifetime findings.

The findings below are optimizations and one benchmark/doc mismatch — none are blocking.

Low-confidence items (not posted inline)

  • runtime/_patch/syscall/js/host_llgo.go:175-186: hostEventDispatching is reset to false inside the launched goroutine before dispatchHostEvent() runs, so the flag is false during actual dispatch. Likely benign under the single-threaded cooperative model, but the name doesn't match its lifetime (it guards only the event fetch). Consider renaming or a clarifying comment.
  • runtime/internal/lib/reflect/makefunc_callback_js.go:70-74: storeJSMakeFuncResultN rounds every field offset by the return aggregate's single alignment rather than each field's own alignment. Mirrors the existing convention in value.go, so any issue would predate this PR — worth confirming against the C-side layout in makefunc_wasm_js.c.

Comment thread internal/build/build.go
Comment thread internal/build/wasm_reflect.go Outdated
Comment thread benchmark/wasm/main.go
@codecov

codecov Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

@cpunion

cpunion commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the two low-confidence review-body notes as well on current head 400bf710e:

  • Renamed hostEventDispatching to hostEventFetching, matching the flag's actual lifetime without changing scheduling semantics.
  • Verified the multi-result alignment concern with an executable (int64, int8, int16) reflection fixture. It reproduced as panic: Call on J32/Emscripten. Call, MakeFunc, and the Asyncify JS replay store now walk libffi result fields using each field's own size/alignment; the regression passes on J32/Emscripten and J64/Emscripten Memory64.

Focused internal/build, ssa, runtime ffi/reflect, and benchmark tests pass; actionlint and git diff --check pass. @fennoai Please re-review final head 400bf710e, including the shared RTA cache, typeutil.Map signature set, host KeepAlive coverage, one-time sentinel initialization, and libffi mixed-result layout fix.

@fennoai

fennoai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

FennoAI is processing your request, please wait a moment...

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

Re-review: WASM W2-A — final head 400bf710e

Re-reviewed the incremental changes since my prior review (ee39c07…400bf71, 19 files) against every point from the last round plus the new items you called out. All five findings are resolved correctly, and the new work is sound. No blocking issues.

Prior findings — resolved

  • Shared RTA cache (P2). configureWasmReflectBridges and configureWasmFuncInfoEntries now go through wasmProgramUseFor(ctx), which computes wasmReflectRoots + rta.Analyze once behind a sync.Once on the context and shares reachable/all between both checks. The duplicate whole-program analysis is gone. (internal/build/wasm_reflect.go:71-96, build.go:1450-1452)
  • Signature set (P2). programMayCallWasmReflectBridgeIndirectly replaces the []*types.Signature + per-call types.Identical scan with a typeutil.Map and an O(1) functionSignatures.At(common.Signature()) lookup. The O(calls × signatures) hot path is eliminated. (wasm_reflect.go:173-205)
  • Benchmark/doc mismatch (P3). README and the reflectcall comment now state that both W32 entries emit typed bridges and that only the named w32-wasi entry is timed (with both module sizes still recorded) to keep CI cost bounded. Accurate now. (benchmark/wasm/README.md:29, benchmark/wasm/main.go:62-64)
  • Host event flag rename. hostEventDispatching → hostEventFetching, and dispatchHostEvent now has an explicit comment on why the handler's bool return is discarded. Scheduling semantics unchanged. (runtime/_patch/syscall/js/host_llgo.go:180-201)
  • Mixed-result libffi layout. Value.call, bind1/bindn, and the JS store paths now walk libffi result fields via ffiResultField + ffi.TypeElement, using each field's own size/alignment instead of a single aggregate alignment, and clamp copies to min(ffiType.Size, typ.Size_). storeMakeFuncResult1_js correctly threads cif through the C shim. This is the right fix for the (int64, int8, int16) regression. (makefunc.go:92-112, value.go:2604-2636, makefunc_ffi.go, makefunc_callback_js.go, makefunc_wasm_js.c)

New items reviewed — all good

  • Host KeepAlive coverage. runtime.KeepAlive is now applied to every Go-owned buffer passed across the host frame boundary — string data, property keys, arg slices, and byte slices in copyBytesTo{Go,JS}/valueLoadString. This correctly prevents the GC from reclaiming backing storage while the host reads the raw pointers stored in the frame. Solid defensive coverage.
  • One-time sentinel init. wasmReflectOnlyPointer/wasmMakeFuncInvokePointer are computed once in init() rather than per callWasmBridge/makeProviderFunc call — removes repeated ValueOf(...).UnsafePointer() work from the reflection call path. (call_bridge_wasm.go:14-23)
  • GC-root shape encoding. Splitting vkString/vkSlice from the byte('a'+kind) arithmetic into explicit s0r/l0r tokens removes the risk of an accidental collision with other shape letters (r, i) in the dedup/fingerprint key. Good robustness improvement. (ssa/reflect_bridge.go:133-142)
  • ffi.TypeElement stays within bounds: callers index 0..n-1 over the result-field count, and ffiResultField panics rather than reading past a nil element.

Verified the helper wiring (align, memmove, ffi.Type.Elements) and the added regression tests (reflect_test.go, wasm_reflect_test.go, pointer_array_test.go). I could not compile locally — the sandbox lacks the LLVM headers that internal/build/ssa require — so I relied on source review; you've reported focused tests, actionlint, and git diff --check passing.

LGTM. 🚢

@github-actions

github-actions Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

LLGo baseline benchmarks

8a7f17a8a227 | 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 19848 B +16 B / +0.1% (worse) 387 B 0 B / +0.0% 446.363 ms -23.86 ms / -5.1% (better) 1.256 ms -1.271 us / -0.1% (better)
Linux cprintf-lto 19600 B +16 B / +0.1% (worse) 368 B 0 B / +0.0% 456.082 ms -6.795 ms / -1.5% (better) 1.257 ms +55.75 us / +4.6% (worse)
Linux fmtprintf 1628352 B +2464 B / +0.2% (worse) 498582 B +620 B / +0.1% (worse) 3.519 s -312.2 ms / -8.1% (better) 3.135 ms +192.6 us / +6.5% (worse)
Linux fmtprintf-lto 1481400 B +1224 B / +0.1% (worse) 438077 B +256 B / +0.1% (worse) 10.868 s -34.59 ms / -0.3% (better) 2.934 ms -184 ns / -0.006271% (better)
Linux println 62240 B +16 B / +0.02571% (worse) 14901 B 0 B / +0.0% 448.326 ms -2.87 ms / -0.6% (better) 1.590 ms +49.52 us / +3.2% (worse)
Linux println-lto 54296 B +16 B / +0.02948% (worse) 12335 B 0 B / +0.0% 656.895 ms -21.76 ms / -3.2% (better) 1.498 ms -12.76 us / -0.8% (better)
macOS cprintf 84480 B 0 B / +0.0% 17117 B +16 B / +0.1% (worse) 626.427 ms +75.94 ms / +13.8% (worse) 3.055 ms -71.88 us / -2.3% (better)
macOS cprintf-lto 84288 B 0 B / +0.0% 12881 B +16 B / +0.1% (worse) 652.199 ms +9.058 ms / +1.4% (worse) 2.773 ms +310.1 us / +12.6% (worse)
macOS fmtprintf 1473584 B +416 B / +0.02824% (worse) 873644 B +1632 B / +0.2% (worse) 3.066 s +237 ms / +8.4% (worse) 5.064 ms +521.3 us / +11.5% (worse)
macOS fmtprintf-lto 1159408 B -16 B / -0.00138% (better) 848900 B +1148 B / +0.1% (worse) 8.551 s +4.529 ms / +0.1% (worse) 6.393 ms +1.046 ms / +19.6% (worse)
macOS println 114672 B 0 B / +0.0% 34828 B +16 B / +0.04596% (worse) 672.352 ms +127 ms / +23.3% (worse) 3.595 ms +170 us / +5.0% (worse)
macOS println-lto 118720 B 0 B / +0.0% 32264 B +16 B / +0.04962% (worse) 862.449 ms +152.2 ms / +21.4% (worse) 5.174 ms +1.981 ms / +62.1% (worse)
Windows MinGW cprintf 19456 B 0 B / +0.0% 4550 B 0 B / +0.0% 1.113 s -1.937 ms / -0.2% (better) 3.366 ms -784.6 us / -18.9% (better)
Windows MinGW cprintf-lto 17920 B 0 B / +0.0% 4486 B 0 B / +0.0% 1.139 s +24.45 ms / +2.2% (worse) 3.391 ms +12.6 us / +0.4% (worse)
Windows MinGW fmtprintf 1897472 B +2048 B / +0.1% (worse) 601734 B +624 B / +0.1% (worse) 3.983 s +19.83 ms / +0.5% (worse) 8.137 ms -451.3 us / -5.3% (better)
Windows MinGW fmtprintf-lto 1938432 B +1536 B / +0.1% (worse) 550694 B +128 B / +0.02325% (worse) 10.505 s +269.1 ms / +2.6% (worse) 8.041 ms -58.4 us / -0.7% (better)
Windows MinGW println 71168 B 0 B / +0.0% 24054 B 0 B / +0.0% 1.118 s +42.83 ms / +4.0% (worse) 6.182 ms -302.9 us / -4.7% (better)
Windows MinGW println-lto 65536 B 0 B / +0.0% 20678 B 0 B / +0.0% 1.348 s +45.96 ms / +3.5% (worse) 6.573 ms +125.5 us / +1.9% (worse)
Windows MinGW 386 cprintf 42496 B 0 B / +0.0% 5326 B 0 B / +0.0% 1.061 s -36.23 ms / -3.3% (better) 5.138 ms +19 us / +0.4% (worse)
Windows MinGW 386 cprintf-lto 20992 B 0 B / +0.0% 5094 B 0 B / +0.0% 1.116 s -20.22 ms / -1.8% (better) 5.064 ms -121.1 us / -2.3% (better)
Windows MinGW 386 fmtprintf 1861632 B +3072 B / +0.2% (worse) 472862 B +432 B / +0.1% (worse) 4.143 s +145.9 ms / +3.7% (worse) 10.908 ms +70.6 us / +0.7% (worse)
Windows MinGW 386 fmtprintf-lto 2168320 B +2560 B / +0.1% (worse) 452838 B +316 B / +0.1% (worse) 10.044 s +452.8 ms / +4.7% (worse) 10.437 ms +424.5 us / +4.2% (worse)
Windows MinGW 386 println 91136 B 0 B / +0.0% 20038 B 0 B / +0.0% 1.096 s +11.43 ms / +1.1% (worse) 8.395 ms +45.5 us / +0.5% (worse)
Windows MinGW 386 println-lto 69632 B 0 B / +0.0% 17954 B 0 B / +0.0% 1.292 s -3.707 ms / -0.3% (better) 8.994 ms +691.1 us / +8.3% (worse)
Windows MinGW ARM64 cprintf 18944 B 0 B / +0.0% 4408 B 0 B / +0.0% 1.419 s -35.01 ms / -2.4% (better) 6.008 ms -487.8 us / -7.5% (better)
Windows MinGW ARM64 cprintf-lto 17920 B 0 B / +0.0% 4340 B 0 B / +0.0% 1.422 s -44.14 ms / -3.0% (better) 5.880 ms -613.9 us / -9.5% (better)
Windows MinGW ARM64 fmtprintf 1783296 B +2560 B / +0.1% (worse) 511268 B +572 B / +0.1% (worse) 4.175 s -55.37 ms / -1.3% (better) 12.976 ms -1.033 ms / -7.4% (better)
Windows MinGW ARM64 fmtprintf-lto 1861632 B +1536 B / +0.1% (worse) 478972 B +60 B / +0.01253% (worse) 10.104 s +203.4 ms / +2.1% (worse) 13.659 ms -448.9 us / -3.2% (better)
Windows MinGW ARM64 println 68608 B 0 B / +0.0% 22544 B 0 B / +0.0% 1.386 s -67.44 ms / -4.6% (better) 10.677 ms -474.4 us / -4.3% (better)
Windows MinGW ARM64 println-lto 64000 B 0 B / +0.0% 19604 B 0 B / +0.0% 1.586 s -66.38 ms / -4.0% (better) 10.652 ms -482.5 us / -4.3% (better)
Windows MSVC cprintf 120320 B 0 B / +0.0% 65782 B 0 B / +0.0% 895.808 ms +4.182 ms / +0.5% (worse) 3.538 ms +24.7 us / +0.7% (worse)
Windows MSVC cprintf-lto 119808 B 0 B / +0.0% 65718 B 0 B / +0.0% 934.363 ms +31.93 ms / +3.5% (worse) 3.780 ms +362.8 us / +10.6% (worse)
Windows MSVC fmtprintf 1627648 B +1536 B / +0.1% (worse) 697254 B +624 B / +0.1% (worse) 3.662 s +94.79 ms / +2.7% (worse) 9.883 ms -13.4 us / -0.1% (better)
Windows MSVC fmtprintf-lto 1626112 B +1024 B / +0.1% (worse) 652998 B +112 B / +0.01715% (worse) 8.922 s -21.85 ms / -0.2% (better) 9.591 ms +323.1 us / +3.5% (worse)
Windows MSVC println 193024 B 0 B / +0.0% 119478 B 0 B / +0.0% 897.802 ms +25.31 ms / +2.9% (worse) 7.418 ms +210 us / +2.9% (worse)
Windows MSVC println-lto 189952 B 0 B / +0.0% 116614 B 0 B / +0.0% 1.087 s -107.1 ms / -9.0% (better) 7.601 ms -704.3 us / -8.5% (better)
Windows MSVC 386 cprintf 9728 B 0 B / +0.0% 3931 B 0 B / +0.0% 940.115 ms -88.73 ms / -8.6% (better) 5.255 ms -555.2 us / -9.6% (better)
Windows MSVC 386 cprintf-lto 9216 B 0 B / +0.0% 3853 B 0 B / +0.0% 944.909 ms -33.04 ms / -3.4% (better) 5.250 ms -730.9 us / -12.2% (better)
Windows MSVC 386 fmtprintf 1192960 B +2048 B / +0.2% (worse) 456229 B +432 B / +0.1% (worse) 3.836 s +79.05 ms / +2.1% (worse) 12.164 ms +61.9 us / +0.5% (worse)
Windows MSVC 386 fmtprintf-lto 1233408 B +1536 B / +0.1% (worse) 431641 B +224 B / +0.1% (worse) 8.649 s -78.74 ms / -0.9% (better) 12.370 ms -84.2 us / -0.7% (better)
Windows MSVC 386 println 34304 B 0 B / +0.0% 18865 B 0 B / +0.0% 911.869 ms -40.77 ms / -4.3% (better) 8.928 ms -3.9 ms / -30.4% (better)
Windows MSVC 386 println-lto 32768 B 0 B / +0.0% 17015 B 0 B / +0.0% 1.099 s -59.92 ms / -5.2% (better) 9.071 ms -811.3 us / -8.2% (better)
Windows MSVC ARM64 cprintf 11264 B 0 B / +0.0% 3976 B 0 B / +0.0% 2.036 s -16.76 ms / -0.8% (better) 6.782 ms +282 us / +4.3% (worse)
Windows MSVC ARM64 cprintf-lto 10752 B 0 B / +0.0% 3868 B 0 B / +0.0% 2.063 s +13.42 ms / +0.7% (worse) 9.084 ms +2.435 ms / +36.6% (worse)
Windows MSVC ARM64 fmtprintf 1373184 B +1536 B / +0.1% (worse) 512100 B +576 B / +0.1% (worse) 6.416 s -21.29 ms / -0.3% (better) 14.195 ms -812.2 us / -5.4% (better)
Windows MSVC ARM64 fmtprintf-lto 1396736 B +1024 B / +0.1% (worse) 481780 B +64 B / +0.01329% (worse) 15.993 s +157.4 ms / +1.0% (worse) 15.173 ms +1.382 ms / +10.0% (worse)
Windows MSVC ARM64 println 41472 B 0 B / +0.0% 21784 B 0 B / +0.0% 2.001 s -27.34 ms / -1.3% (better) 12.092 ms -944.9 us / -7.2% (better)
Windows MSVC ARM64 println-lto 39936 B 0 B / +0.0% 19532 B 0 B / +0.0% 2.350 s +36.6 ms / +1.6% (worse) 12.085 ms +9.2 us / +0.1% (worse)
Core language and compiler benchmarks
Platform Benchmark ns/op vs base
Linux BenchmarkLookupPCRandom 14.670 ns/op +0.13 ns/op / +0.9% (worse)
Linux BenchmarkMergeCompilerFlags 210.200 ns/op +14.8 ns/op / +7.6% (worse)
Linux BenchmarkMergeLinkerFlags 130.700 ns/op +5 ns/op / +4.0% (worse)
Linux BenchmarkChannelBuffered 55.120 ns/op -0.64 ns/op / -1.1% (better)
Linux BenchmarkChannelHandoff 14027 ns/op -5745 ns/op / -29.1% (better)
Linux BenchmarkDefer 48.830 ns/op +2.66 ns/op / +5.8% (worse)
Linux BenchmarkDirectCall 1.164 ns/op -0.389 ns/op / -25.0% (better)
Linux BenchmarkGlobalRead 1.163 ns/op -0.002 ns/op / -0.2% (better)
Linux BenchmarkGlobalWrite 7.754 ns/op -0.015 ns/op / -0.2% (better)
Linux BenchmarkGoroutine 30759 ns/op +10550 ns/op / +52.2% (worse)
Linux BenchmarkInterfaceCall 5.817 ns/op -0.436 ns/op / -7.0% (better)
Linux BenchmarkRuntimeGetG 2.431 ns/op -0.011 ns/op / -0.5% (better)
macOS BenchmarkLookupPCRandom 12.770 ns/op -1.18 ns/op / -8.5% (better)
macOS BenchmarkMergeCompilerFlags 96.340 ns/op -28.56 ns/op / -22.9% (better)
macOS BenchmarkMergeLinkerFlags 62.140 ns/op -15.95 ns/op / -20.4% (better)
macOS BenchmarkChannelBuffered 24.630 ns/op -5.9 ns/op / -19.3% (better)
macOS BenchmarkChannelHandoff 6797 ns/op -3287 ns/op / -32.6% (better)
macOS BenchmarkDefer 39.530 ns/op -1.69 ns/op / -4.1% (better)
macOS BenchmarkDirectCall 1.070 ns/op -0.195 ns/op / -15.4% (better)
macOS BenchmarkGlobalRead 1.154 ns/op -0.083 ns/op / -6.7% (better)
macOS BenchmarkGlobalWrite 1.128 ns/op -0.615 ns/op / -35.3% (better)
macOS BenchmarkGoroutine 39868 ns/op +2225 ns/op / +5.9% (worse)
macOS BenchmarkInterfaceCall 3.957 ns/op -0.784 ns/op / -16.5% (better)
macOS BenchmarkRuntimeGetG 2.042 ns/op -0.318 ns/op / -13.5% (better)
Windows MinGW BenchmarkLookupPCRandom 12.360 ns/op -0.04 ns/op / -0.3% (better)
Windows MinGW BenchmarkMergeCompilerFlags 550.300 ns/op -31.7 ns/op / -5.4% (better)
Windows MinGW BenchmarkMergeLinkerFlags 468.100 ns/op -62.2 ns/op / -11.7% (better)
Windows MinGW BenchmarkChannelBuffered 35.310 ns/op -0.12 ns/op / -0.3% (better)
Windows MinGW BenchmarkChannelHandoff 1257 ns/op -38 ns/op / -2.9% (better)
Windows MinGW BenchmarkDefer 54.150 ns/op +0.78 ns/op / +1.5% (worse)
Windows MinGW BenchmarkDirectCall 1.747 ns/op 0 ns/op / +0.0%
Windows MinGW BenchmarkGlobalRead 1.907 ns/op +0.162 ns/op / +9.3% (worse)
Windows MinGW BenchmarkGlobalWrite 2.789 ns/op +0.001 ns/op / +0.03587% (worse)
Windows MinGW BenchmarkGoroutine 68573 ns/op -750 ns/op / -1.1% (better)
Windows MinGW BenchmarkInterfaceCall 9.119 ns/op +0.362 ns/op / +4.1% (worse)
Windows MinGW BenchmarkRuntimeGetG 2.102 ns/op +0.003 ns/op / +0.1% (worse)
Windows MinGW 386 BenchmarkLookupPCRandom 26.510 ns/op -0.01 ns/op / -0.03771% (better)
Windows MinGW 386 BenchmarkMergeCompilerFlags 751.500 ns/op -6 ns/op / -0.8% (better)
Windows MinGW 386 BenchmarkMergeLinkerFlags 667.300 ns/op -12.6 ns/op / -1.9% (better)
Windows MinGW 386 BenchmarkChannelBuffered 40.930 ns/op -0.92 ns/op / -2.2% (better)
Windows MinGW 386 BenchmarkChannelHandoff 963.500 ns/op -50.5 ns/op / -5.0% (better)
Windows MinGW 386 BenchmarkDefer 43.810 ns/op +0.74 ns/op / +1.7% (worse)
Windows MinGW 386 BenchmarkDirectCall 1.860 ns/op +0.314 ns/op / +20.3% (worse)
Windows MinGW 386 BenchmarkGlobalRead 1.861 ns/op -0.003 ns/op / -0.2% (better)
Windows MinGW 386 BenchmarkGlobalWrite 7.773 ns/op -0.007 ns/op / -0.1% (better)
Windows MinGW 386 BenchmarkGoroutine 85919 ns/op -3770 ns/op / -4.2% (better)
Windows MinGW 386 BenchmarkInterfaceCall 8.364 ns/op -0.038 ns/op / -0.5% (better)
Windows MinGW 386 BenchmarkRuntimeGetG 1.927 ns/op -0.246 ns/op / -11.3% (better)
Windows MinGW ARM64 BenchmarkLookupPCRandom 12.120 ns/op +0.06 ns/op / +0.5% (worse)
Windows MinGW ARM64 BenchmarkMergeCompilerFlags 567.300 ns/op +11.8 ns/op / +2.1% (worse)
Windows MinGW ARM64 BenchmarkMergeLinkerFlags 546.500 ns/op +6 ns/op / +1.1% (worse)
Windows MinGW ARM64 BenchmarkChannelBuffered 39.390 ns/op +0.55 ns/op / +1.4% (worse)
Windows MinGW ARM64 BenchmarkChannelHandoff 1765 ns/op -297 ns/op / -14.4% (better)
Windows MinGW ARM64 BenchmarkDefer 54.030 ns/op +1.37 ns/op / +2.6% (worse)
Windows MinGW ARM64 BenchmarkDirectCall 0.590 ns/op +0.0001 ns/op / +0.01696% (worse)
Windows MinGW ARM64 BenchmarkGlobalRead 0.664 ns/op +0.0002 ns/op / +0.03015% (worse)
Windows MinGW ARM64 BenchmarkGlobalWrite 0.589 ns/op -0.2952 ns/op / -33.4% (better)
Windows MinGW ARM64 BenchmarkGoroutine 56249 ns/op +1278 ns/op / +2.3% (worse)
Windows MinGW ARM64 BenchmarkInterfaceCall 4.138 ns/op -0.165 ns/op / -3.8% (better)
Windows MinGW ARM64 BenchmarkRuntimeGetG 1.768 ns/op -0.004 ns/op / -0.2% (better)
Windows MSVC BenchmarkLookupPCRandom 11.470 ns/op +0.12 ns/op / +1.1% (worse)
Windows MSVC BenchmarkMergeCompilerFlags 562.200 ns/op +9 ns/op / +1.6% (worse)
Windows MSVC BenchmarkMergeLinkerFlags 487.600 ns/op -0.4 ns/op / -0.1% (better)
Windows MSVC BenchmarkChannelBuffered 45.350 ns/op -0.64 ns/op / -1.4% (better)
Windows MSVC BenchmarkChannelHandoff 1238 ns/op -270 ns/op / -17.9% (better)
Windows MSVC BenchmarkDefer 65.030 ns/op -0.08 ns/op / -0.1% (better)
Windows MSVC BenchmarkDirectCall 1.124 ns/op -0.043 ns/op / -3.7% (better)
Windows MSVC BenchmarkGlobalRead 1.312 ns/op -0.016 ns/op / -1.2% (better)
Windows MSVC BenchmarkGlobalWrite 8.497 ns/op +0.013 ns/op / +0.2% (worse)
Windows MSVC BenchmarkGoroutine 67221 ns/op -1306 ns/op / -1.9% (better)
Windows MSVC BenchmarkInterfaceCall 6.372 ns/op +0.436 ns/op / +7.3% (worse)
Windows MSVC BenchmarkRuntimeGetG 1.591 ns/op +0.034 ns/op / +2.2% (worse)
Windows MSVC 386 BenchmarkLookupPCRandom 26.490 ns/op 0 ns/op / +0.0%
Windows MSVC 386 BenchmarkMergeCompilerFlags 771.400 ns/op +24 ns/op / +3.2% (worse)
Windows MSVC 386 BenchmarkMergeLinkerFlags 657 ns/op -9.4 ns/op / -1.4% (better)
Windows MSVC 386 BenchmarkChannelBuffered 42.550 ns/op -2.98 ns/op / -6.5% (better)
Windows MSVC 386 BenchmarkChannelHandoff 1014 ns/op -28 ns/op / -2.7% (better)
Windows MSVC 386 BenchmarkDefer 45.050 ns/op -3.9 ns/op / -8.0% (better)
Windows MSVC 386 BenchmarkDirectCall 1.547 ns/op +0.001 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkGlobalRead 1.857 ns/op +0.308 ns/op / +19.9% (worse)
Windows MSVC 386 BenchmarkGlobalWrite 7.778 ns/op -0.014 ns/op / -0.2% (better)
Windows MSVC 386 BenchmarkGoroutine 85955 ns/op -3270 ns/op / -3.7% (better)
Windows MSVC 386 BenchmarkInterfaceCall 8.382 ns/op +0.01 ns/op / +0.1% (worse)
Windows MSVC 386 BenchmarkRuntimeGetG 2.169 ns/op +0.23 ns/op / +11.9% (worse)
Windows MSVC ARM64 BenchmarkLookupPCRandom 12.010 ns/op -0.07 ns/op / -0.6% (better)
Windows MSVC ARM64 BenchmarkMergeCompilerFlags 577.900 ns/op -5.5 ns/op / -0.9% (better)
Windows MSVC ARM64 BenchmarkMergeLinkerFlags 539.100 ns/op -6.1 ns/op / -1.1% (better)
Windows MSVC ARM64 BenchmarkChannelBuffered 37.720 ns/op -0.15 ns/op / -0.4% (better)
Windows MSVC ARM64 BenchmarkChannelHandoff 2636 ns/op +446 ns/op / +20.4% (worse)
Windows MSVC ARM64 BenchmarkDefer 67.160 ns/op +5.39 ns/op / +8.7% (worse)
Windows MSVC ARM64 BenchmarkDirectCall 0.590 ns/op 0 ns/op / +0.0%
Windows MSVC ARM64 BenchmarkGlobalRead 0.590 ns/op -0.0763 ns/op / -11.5% (better)
Windows MSVC ARM64 BenchmarkGlobalWrite 3.794 ns/op +0.033 ns/op / +0.9% (worse)
Windows MSVC ARM64 BenchmarkGoroutine 58041 ns/op +328 ns/op / +0.6% (worse)
Windows MSVC ARM64 BenchmarkInterfaceCall 4.157 ns/op -0.04 ns/op / -1.0% (better)
Windows MSVC ARM64 BenchmarkRuntimeGetG 2.220 ns/op +0.425 ns/op / +23.7% (worse)

Timer runtime benchmarks

Platform Operation and runtime ns/op vs base
Linux AfterFuncZeroDelivery/Go 904.700 ns/op +0.2 ns/op / +0.02211% (worse)
Linux AfterFuncZeroDelivery/LLGo 39295 ns/op +5488 ns/op / +16.2% (worse)
Linux CreateStop/Go 288.100 ns/op -0.7 ns/op / -0.2% (better)
Linux CreateStop/LLGo 1692 ns/op -151 ns/op / -8.2% (better)
Linux RearmStopped/Go 115.700 ns/op -1 ns/op / -0.9% (better)
Linux RearmStopped/LLGo 1286 ns/op +56 ns/op / +4.6% (worse)
Linux ResetActive/Go 68.250 ns/op -0.36 ns/op / -0.5% (better)
Linux ResetActive/LLGo 657.600 ns/op -152.8 ns/op / -18.9% (better)
Linux ResetHeap1024/Go 67.080 ns/op -0.13 ns/op / -0.2% (better)
Linux ResetHeap1024/LLGo 179.400 ns/op -7 ns/op / -3.8% (better)
macOS AfterFuncZeroDelivery/Go 374.100 ns/op -136.1 ns/op / -26.7% (better)
macOS AfterFuncZeroDelivery/LLGo 77471 ns/op -143 ns/op / -0.2% (better)
macOS CreateStop/Go 140.400 ns/op -13.5 ns/op / -8.8% (better)
macOS CreateStop/LLGo 507.200 ns/op -56.5 ns/op / -10.0% (better)
macOS RearmStopped/Go 60.460 ns/op -5.38 ns/op / -8.2% (better)
macOS RearmStopped/LLGo 313.500 ns/op -76.2 ns/op / -19.6% (better)
macOS ResetActive/Go 40.640 ns/op -6.57 ns/op / -13.9% (better)
macOS ResetActive/LLGo 149.200 ns/op -18.2 ns/op / -10.9% (better)
macOS ResetHeap1024/Go 39.740 ns/op -8 ns/op / -16.8% (better)
macOS ResetHeap1024/LLGo 79.440 ns/op -13.42 ns/op / -14.5% (better)
Windows MinGW AfterFuncZeroDelivery/Go 466.700 ns/op -7.8 ns/op / -1.6% (better)
Windows MinGW AfterFuncZeroDelivery/LLGo 127096 ns/op -1482 ns/op / -1.2% (better)
Windows MinGW CreateStop/Go 116.800 ns/op -0.8 ns/op / -0.7% (better)
Windows MinGW CreateStop/LLGo 452.500 ns/op +6.4 ns/op / +1.4% (worse)
Windows MinGW RearmStopped/Go 31.560 ns/op +0.07 ns/op / +0.2% (worse)
Windows MinGW RearmStopped/LLGo 284.200 ns/op -2.5 ns/op / -0.9% (better)
Windows MinGW ResetActive/Go 19.090 ns/op +0.02 ns/op / +0.1% (worse)
Windows MinGW ResetActive/LLGo 162.700 ns/op -2.1 ns/op / -1.3% (better)
Windows MinGW ResetHeap1024/Go 19.100 ns/op +0.04 ns/op / +0.2% (worse)
Windows MinGW ResetHeap1024/LLGo 138.700 ns/op +1.4 ns/op / +1.0% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/Go 953.500 ns/op +2.2 ns/op / +0.2% (worse)
Windows MinGW 386 AfterFuncZeroDelivery/LLGo 188279 ns/op -2473 ns/op / -1.3% (better)
Windows MinGW 386 CreateStop/Go 190.100 ns/op 0 ns/op / +0.0%
Windows MinGW 386 CreateStop/LLGo 1680 ns/op +84 ns/op / +5.3% (worse)
Windows MinGW 386 RearmStopped/Go 63.340 ns/op +0.02 ns/op / +0.03159% (worse)
Windows MinGW 386 RearmStopped/LLGo 356.900 ns/op +17.1 ns/op / +5.0% (worse)
Windows MinGW 386 ResetActive/Go 39.110 ns/op +0.06 ns/op / +0.2% (worse)
Windows MinGW 386 ResetActive/LLGo 463.600 ns/op -507.8 ns/op / -52.3% (better)
Windows MinGW 386 ResetHeap1024/Go 39.400 ns/op -0.01 ns/op / -0.02537% (better)
Windows MinGW 386 ResetHeap1024/LLGo 186.300 ns/op -0.7 ns/op / -0.4% (better)
Windows MinGW ARM64 AfterFuncZeroDelivery/Go 672.500 ns/op +9.7 ns/op / +1.5% (worse)
Windows MinGW ARM64 AfterFuncZeroDelivery/LLGo 134875 ns/op +3676 ns/op / +2.8% (worse)
Windows MinGW ARM64 CreateStop/Go 195 ns/op +2.7 ns/op / +1.4% (worse)
Windows MinGW ARM64 CreateStop/LLGo 395.800 ns/op +14.5 ns/op / +3.8% (worse)
Windows MinGW ARM64 RearmStopped/Go 70.590 ns/op -0.01 ns/op / -0.01416% (better)
Windows MinGW ARM64 RearmStopped/LLGo 253.600 ns/op -0.1 ns/op / -0.03942% (better)
Windows MinGW ARM64 ResetActive/Go 31.060 ns/op +0.01 ns/op / +0.03221% (worse)
Windows MinGW ARM64 ResetActive/LLGo 130.900 ns/op -2.2 ns/op / -1.7% (better)
Windows MinGW ARM64 ResetHeap1024/Go 31.040 ns/op -0.09 ns/op / -0.3% (better)
Windows MinGW ARM64 ResetHeap1024/LLGo 126.600 ns/op -0.5 ns/op / -0.4% (better)
Windows MSVC AfterFuncZeroDelivery/Go 690 ns/op +2.3 ns/op / +0.3% (worse)
Windows MSVC AfterFuncZeroDelivery/LLGo 129170 ns/op -462 ns/op / -0.4% (better)
Windows MSVC CreateStop/Go 188.600 ns/op +1.9 ns/op / +1.0% (worse)
Windows MSVC CreateStop/LLGo 1148 ns/op +88 ns/op / +8.3% (worse)
Windows MSVC RearmStopped/Go 70.220 ns/op +0.58 ns/op / +0.8% (worse)
Windows MSVC RearmStopped/LLGo 328.500 ns/op +3.9 ns/op / +1.2% (worse)
Windows MSVC ResetActive/Go 31.230 ns/op +0.44 ns/op / +1.4% (worse)
Windows MSVC ResetActive/LLGo 215.900 ns/op +34.9 ns/op / +19.3% (worse)
Windows MSVC ResetHeap1024/Go 31.460 ns/op +0.19 ns/op / +0.6% (worse)
Windows MSVC ResetHeap1024/LLGo 130.200 ns/op +0.2 ns/op / +0.2% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/Go 958.700 ns/op +4 ns/op / +0.4% (worse)
Windows MSVC 386 AfterFuncZeroDelivery/LLGo 182874 ns/op -3917 ns/op / -2.1% (better)
Windows MSVC 386 CreateStop/Go 192.100 ns/op -2 ns/op / -1.0% (better)
Windows MSVC 386 CreateStop/LLGo 1779 ns/op -124 ns/op / -6.5% (better)
Windows MSVC 386 RearmStopped/Go 63.270 ns/op +0.06 ns/op / +0.1% (worse)
Windows MSVC 386 RearmStopped/LLGo 330.700 ns/op +2.6 ns/op / +0.8% (worse)
Windows MSVC 386 ResetActive/Go 39.030 ns/op -0.04 ns/op / -0.1% (better)
Windows MSVC 386 ResetActive/LLGo 263.500 ns/op -754.5 ns/op / -74.1% (better)
Windows MSVC 386 ResetHeap1024/Go 39.480 ns/op +0.12 ns/op / +0.3% (worse)
Windows MSVC 386 ResetHeap1024/LLGo 171.200 ns/op -3.2 ns/op / -1.8% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/Go 665.800 ns/op -14.1 ns/op / -2.1% (better)
Windows MSVC ARM64 AfterFuncZeroDelivery/LLGo 134781 ns/op -10667 ns/op / -7.3% (better)
Windows MSVC ARM64 CreateStop/Go 206.500 ns/op +5.6 ns/op / +2.8% (worse)
Windows MSVC ARM64 CreateStop/LLGo 395.400 ns/op +11.4 ns/op / +3.0% (worse)
Windows MSVC ARM64 RearmStopped/Go 70.590 ns/op -0.02 ns/op / -0.02832% (better)
Windows MSVC ARM64 RearmStopped/LLGo 277.600 ns/op +2.4 ns/op / +0.9% (worse)
Windows MSVC ARM64 ResetActive/Go 31.140 ns/op +0.06 ns/op / +0.2% (worse)
Windows MSVC ARM64 ResetActive/LLGo 128.300 ns/op +2.7 ns/op / +2.1% (worse)
Windows MSVC ARM64 ResetHeap1024/Go 31.170 ns/op -0.03 ns/op / -0.1% (better)
Windows MSVC ARM64 ResetHeap1024/LLGo 139.500 ns/op +2.3 ns/op / +1.7% (worse)

Compared with 4564a01aa520 measured in the same runner job.

@github-actions

github-actions Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

LLGo WebAssembly build benchmarks

8a7f17a8a227 | workflow run | long-term charts

WebAssembly output sizes

Profile and compiler Wasm module vs base Generated JS glue vs base
cprintf/j32-emscripten/LLGo 130791 B +16816 B / +14.8% (worse) 70786 B +50 B / +0.1% (worse)
cprintf/j32-goos-js/LLGo 129098 B +61760 B / +91.7% (worse) 69150 B +639 B / +0.9% (worse)
cprintf/j64-emscripten-memory64/LLGo 119533 B +79 B / +0.1% (worse) 73998 B -35 B / -0.04728% (better)
cprintf/w32-goos-wasip1/LLGo 133277 B +59302 B / +80.2% (worse) 0 B 0 B / 0.0%
cprintf/w32-wasi/LLGo 133389 B +15356 B / +13.0% (worse) 0 B 0 B / 0.0%
fmtprintf/j32-emscripten/LLGo 3504470 B +530295 B / +17.8% (worse) 114540 B +5834 B / +5.4% (worse)
fmtprintf/j32-goos-js/Go 2526852 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/j32-goos-js/LLGo 3497910 B +1134823 B / +48.0% (worse) 98239 B -8402 B / -7.9% (better)
fmtprintf/j64-emscripten-memory64/LLGo 3160099 B -3623 B / -0.1% (better) 121334 B +663 B / +0.5% (worse)
fmtprintf/w32-goos-wasip1/Go 2500019 B 0 B / +0.0% 0 B 0 B / 0.0%
fmtprintf/w32-goos-wasip1/LLGo 3370663 B +1219689 B / +56.7% (worse) 0 B 0 B / 0.0%
fmtprintf/w32-wasi/LLGo 3226356 B +481506 B / +17.5% (worse) 0 B 0 B / 0.0%
j32-emscripten/LLGo 129934 B +16691 B / +14.7% (worse) 70786 B +50 B / +0.1% (worse)
j32-goos-js/Go 1895533 B 0 B / +0.0% 0 B 0 B / 0.0%
j32-goos-js/LLGo 128404 B +61744 B / +92.6% (worse) 69150 B +639 B / +0.9% (worse)
j64-emscripten-memory64/LLGo 118767 B +79 B / +0.1% (worse) 73998 B -35 B / -0.04728% (better)
reflectcall/j32-emscripten/LLGo 1828330 B +275768 B / +17.8% (worse) 88948 B +1375 B / +1.6% (worse)
reflectcall/j32-goos-js/Go 2191221 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/j32-goos-js/LLGo 1829735 B +569742 B / +45.2% (worse) 87312 B +2099 B / +2.5% (worse)
reflectcall/j64-emscripten-memory64/LLGo 1651840 B +2224 B / +0.1% (worse) 94487 B -35 B / -0.03703% (better)
reflectcall/w32-goos-wasip1/Go 2205707 B 0 B / +0.0% 0 B 0 B / 0.0%
reflectcall/w32-goos-wasip1/LLGo 1921234 B +666397 B / +53.1% (worse) 0 B 0 B / 0.0%
reflectcall/w32-wasi/LLGo 1849848 B +330738 B / +21.8% (worse) 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 132407 B +59490 B / +81.6% (worse) 0 B 0 B / 0.0%
w32-wasi/LLGo 132618 B +15259 B / +13.0% (worse) 0 B 0 B / 0.0%

LLGo WebAssembly build measurements

Profile Build vs base
j32-emscripten 5.679 s +393.6 ms / +7.4% (worse)
j32-goos-js 5.804 s +1.269 s / +28.0% (worse)
j64-emscripten-memory64 4.971 s +53.59 ms / +1.1% (worse)
reflectcall/w32-wasi 49.890 s +13.17 s / +35.9% (worse)
w32-goos-wasip1 4.355 s +1.296 s / +42.3% (worse)
w32-wasi 4.305 s +458.7 ms / +11.9% (worse)

Compared with 4564a01aa520 measured in the same runner job.

@cpunion

cpunion commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator Author

@fennoai Please re-review current head 7d63156a1fa5. The only change after the previous LGTM is the Windows-portability fix for the raw GoJS host-runner test: the temporary node.exe directory is prepended to the inherited PATH instead of replacing it, so MinGW runtime DLLs remain discoverable while Node is still shadowed. The focused test and git diff --check pass.

@fennoai

fennoai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

FennoAI is processing your request, please wait a moment...

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

Re-review: WASM W2-A — head 7d63156a1fa5

Diffed 400bf710e…7d63156 (the range since my previous LGTM). The only change is the single test-only fix you described, and it is correct.

internal/build/build_test.go (TestExecuteInitialPackageLinkRawWasmRunUsesHostRunner): PATH is now built as binDir + os.PathListSeparator + os.Getenv("PATH") instead of replacing PATH with binDir alone, applied consistently to both t.Setenv and the commandEnv.

This is the right fix:

  • The temp binDir stays first, so the linked node/node.exe still shadows any real Node on the runner — the dispatch behavior under test is unchanged.
  • Retaining the inherited PATH keeps MinGW runtime DLLs discoverable on Windows, where the test binary (os.Args[0]) is the shadow executable.
  • os.PathListSeparator is the portable separator (; on Windows, : elsewhere), so it works cross-platform.

No production code changed since the previous approval. LGTM stands. 🚢

@cpunion

cpunion commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator Author

@fennoai Please re-review W2-A after rebasing its 33-commit range from W1 fcafb85 onto the gated W1 head db71cc5 (new W2-A head 8a7f17a). Git range-diff reports all 33 commits exactly equivalent, and focused host-adapter, reflection, funcinfo, target, runner, script, and ffi tests pass locally. Please confirm content equivalence, prior findings remain resolved, and no interaction regression is introduced by current main through the rebased W1 layer.

@fennoai

fennoai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

FennoAI is processing your request, please wait a moment...

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

Re-review: WASM W2-A — rebased head 8a7f17a8a

Confirmed content equivalence and no interaction regression through the rebased W1 layer. The rebase is clean; my previous LGTM carries over.

Commit-level equivalence

git range-diff fcafb8546..7d63156a1 db71cc582..8a7f17a8a reports all 33 commits = (byte-identical patches) — every commit maps 1:1 with no content delta, matching your report.

Net-content equivalence (stronger check)

I compared the full net W2-A diff against both bases:

  • git diff fcafb8546..7d63156a1 (old range)
  • git diff db71cc582..8a7f17a8a (rebased range)

Both are 6036 lines and byte-for-byte identical apart from git blob-hash index lines. Because the context lines are also identical, the rebased W1 head presents the same surrounding code at every site W2-A touches — so current main, carried in through the rebased W1 layer, introduces no interaction regression at the W2-A boundary. 29 of the 83 W2-A files also moved in the base (fcafb…4564a01), and even those show identical context, which is the direct evidence for the no-regression question you raised.

Baseline sanity

  • W1 head db71cc582 is a proper ancestor of the new head, and exactly 33 commits sit on top of it.
  • PR base 4564a01aa (main) is the merge-base with the head — the range is cleanly stacked.
  • git diff --check clean; no conflict markers; working tree clean at head.

Prior findings

Since the W2-A content is identical to the previously-approved head 7d63156a1, all earlier findings (shared RTA cache, typeutil.Map signature set, host KeepAlive coverage, one-time sentinel init, libffi mixed-result layout, and the PATH portability fix) remain resolved by construction.

LGTM. 🚢

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