web: Mesa and Tint built with SIMD, ThinLTO and a -O3 link (E4)

pewasm's Mesa overlay (tools/optimization_config.py --opt 3 --simd
--thin-lto): -msimd128 -flto=thin, and -O3 at link, which runs binaryen.
A replayed Noita frame (edger, CLIENT_ARRAY stream, 600 frames, two
passes): 5.10 and 5.00 ms of gex_gl_submit CPU against 5.35 and 5.39 ms
with meson's plain release flags, 6% less; same WebGPU call counts and
readback digest. A further wasm-opt -O2 over it gained nothing.

Gates with this Mesa in web/public/gex: tests/nt/browser-gui.mjs --gl,
--arch x86 and x64, composited and GEX_NT_PAGE_FLAGS='&direct=1' (12 ok
each); tests/gl-replay.mjs on tests/gl-traces (softpipe, both PASS).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_d2453757b8a84fdbb4ee7c9e093141df
This commit is contained in:
velzieandClaude Opus 5.5 committed 2026-10-07 22:06:34 -04:00
1 parent 6dd6b3fc4d
commit c5e6dddbd5
1 file changed
+8 -2
+8 -2
View File
@@ -14,6 +14,12 @@ endian = 'little'
[properties]
needs_exe_wrapper = true
# SIMD and ThinLTO, and binaryen at -O3 when linking (emcc runs it for a
# linking -O3): pewasm's Mesa overlay (tools/optimization_config.py --opt 3
# --simd --thin-lto). A replayed Noita frame costs 7% less CPU in
# gex_gl_submit (5.09 and 4.99 ms against 5.45 and 5.47; docs/gl-path.md).
[built-in options]
c_args = ['-D_GNU_SOURCE', '-D_POSIX_C_SOURCE=200809L', '-pthread']
cpp_args = ['-D_GNU_SOURCE', '-D_POSIX_C_SOURCE=200809L', '-pthread']
c_args = ['-D_GNU_SOURCE', '-D_POSIX_C_SOURCE=200809L', '-pthread', '-msimd128', '-flto=thin']
cpp_args = ['-D_GNU_SOURCE', '-D_POSIX_C_SOURCE=200809L', '-pthread', '-msimd128', '-flto=thin']
c_link_args = ['-msimd128', '-flto=thin', '-O3']
cpp_link_args = ['-msimd128', '-flto=thin', '-O3']