Native Messaging WASI host benchmark
Each host is sent a Native Messaging protocol frame (4-byte LE length + UTF-8 JSON) carrying
Array(N) over stdin under wasmtime; the echoed frames are validated as JSON and the
round-trip is timed. Headless equivalent of the connectNative benchmark in
test_wasi.js. Two sizes: ~1 MiB (a typical message) and ~64 MiB (Native Messaging
extension→host maximum). Lower wall(s) is faster; peak(MB) is the host
process's peak RSS — at 64 MiB it separates streaming hosts (flat memory) from those that hold
the whole body. Best of 3 runs.
~1.00 MiB — Array(209715)
| host | wall(s) | peak(MB) | frames | elems | validJSON | match(N) |
| nm_c_wasi | 0.005 | 21 | 1 | 209715 | true | true |
| nm_assemblyscript | 0.006 | 21 | 1 | 209715 | true | true |
| nm_js2wasm | 0.006 | 22 | 1 | 209715 | true | true |
| nm_tinygo_wasi | 0.006 | 22 | 1 | 209715 | true | true |
| nm_rust_wasi | 0.007 | 22 | 1 | 209715 | true | true |
| nm_zig_wasi | 0.007 | 24 | 1 | 209715 | true | true |
| nm_javy | 0.018 | 29 | 1 | 209715 | true | true |
| nm_cpp_wasi | 0.020 | 23 | 1 | 209715 | true | true |
| nm_go_wasi | 0.022 | 33 | 1 | 209715 | true | true |
~64.00 MiB — Array(13421760)
| host | wall(s) | peak(MB) | frames | elems | validJSON | match(N) |
| nm_c_wasi | 0.095 | 85 | 65 | 13421760 | true | true |
| nm_zig_wasi | 0.096 | 88 | 65 | 13421760 | true | true |
| nm_rust_wasi | 0.112 | 85 | 65 | 13421760 | true | true |
| nm_assemblyscript | 0.121 | 150 | 65 | 13421760 | true | true |
| nm_go_wasi | 0.125 | 159 | 65 | 13421760 | true | true |
| nm_javy | 0.130 | 91 | 65 | 13421760 | true | true |
| nm_tinygo_wasi | 0.164 | 149 | 65 | 13421760 | true | true |
| nm_js2wasm | 0.271 | 23 | 65 | 13421760 | true | true |
| nm_cpp_wasi | 0.772 | 86 | 65 | 13421760 | true | true |
Generated 2026-06-14T14:26:41.644Z by ci/benchmark.mjs · each table sorted fastest first.