Optimizing Webassembly Performance

Audits WebAssembly performance and capability fallbacks.

socketdev 2f1e7ea 1.0 KB Updated

File contents

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.

  1. Read the shared WebAssembly capability audit.
  2. Batch JS/Wasm work, pass bytes plus offsets, and separately measure compile, instantiate, load, crossing, execution, and retained-memory cost.
  3. For shared memory, require an explicit maximum, correct atomics/thread toolchain, a synchronization design, and a non-threaded fallback.
  4. Recreate typed-array views after memory growth and version cross-language layouts.
  5. Keep late Wasm features behind a compile/instantiate probe and baseline variant.

For parser representation, use optimizing-parser-performance.

socketdev/socket-btm/tree/main/.claude/skills/fleet/optimizing-webassembly-performance commit 2f1e7eacbf

Frequently asked questions

npx skillmds@latest add socketdev/optimizing-webassembly-performance