Node.js 26.9 turns node:ffi on by default at 37 nanoseconds a call
In Node.js 26.9.0, the node:ffi module for calling native functions without compiling addons is enabled by default — the --experimental-ffi flag is no longer needed, and it can be disabled via --no-experimental-ffi. A call costs about 37 ns, which is 7–8% slower than an N-API addon but 15–20% faster than JS for bulk buffer processing.
- node:ffi enabled by default since 26.9.0, disabled with --no-experimental-ffi
- FFI call is 37.5–38.1 ns vs 34.1–35.8 ns for N-API addon
- Summing 10 million float64 via pointer: 13.8–14.0 ms vs 16.0–18.4 ms in JS
- Wrong return type causes silent truncation, wrong pointer length causes segfault
Read next
Software