News for hackers. Stuff that matters.
Re:Comparing the C FFI overhead on various languages by Koromix on Saturday May 14, 2022 @10:25AM (#31378205)
The official solutions, node-ffi and node-ffi-napi, are extremely slow, with an overhead hundred of times higher than it should be. I don't know what they do to be so slow.

I'm making my own FFI module for Node.js, Koffi, as a much faster alternative. You can see some benchmark here, to compare with node-ffi-napi: https://www.npmjs.com/package/koffi#benchmarks

Re:Comparing the C FFI overhead on various languages by SemanticStrengh on Saturday May 14, 2022 @10:50AM (#31378494)
An interesting alternative would be to not have any FFI and to use transparent polyglot interop between javascript and c++ via GraalJs /sulong