Optimizing WebAssembly Performance
Start from a portable baseline module. A current Node/V8 capability is not a fleet support guarantee: validate and instantiate the exact artifact on every supported host/version.
- Read the shared WebAssembly capability audit.
- Batch JS/Wasm work, pass bytes plus offsets, and separately measure compile, instantiate, load, crossing, execution, and retained-memory cost.
- For shared memory, require an explicit maximum, correct atomics/thread toolchain, a synchronization design, and a non-threaded fallback.
- Recreate typed-array views after memory growth and version cross-language layouts.
- Keep late Wasm features behind a compile/instantiate probe and baseline variant.
For parser representation, use optimizing-parser-performance.