First taste of Rust via coding agent: WASM SIMD kernel is 10x faster, ship it over native

tristanbob · x · 2026-10-24

tristanbob shares results from his first Rust project — written by his coding agent: a Rust SIMD prototype of his TypeScript game kernel, compiled to both WebAssembly SIMD and native AVX2/FMA.

Single-core benchmarks: Champion drops from 0.82ms to 0.083ms per move (9.9x faster) on WASM, 0.065ms (12.6x) native; M-Bot improves 6-8.7x. Both builds match PyTorch to within 3e-5.

The agent's engineering advice is the highlight: ship the WASM build, not native — it's within 1.4x of native, needs just one 55KB .wasm file Node loads directly, no per-platform Rust toolchain in Docker, and runs identically on any VPS CPU, versus 30% more speed for a native addon with much more to break. On a cheap VPS that means 1-2ms per move and 40+ concurrent M-Bot matches per core instead of 6-8.

Original post →

More from coding & agent

coding & agent channel →