4 ms·
This is way outside the realm of my expertise, but I’m curious how a FFI would be better than just calling child_process.exec for accessing a C binary. I suppos
by reilly3000 5y ago
This is way outside the realm of my expertise, but I’m curious how a FFI would be better than just calling child_process.exec for accessing a C binary. I suppose that may not be efficient inside of a game loop, but I don’t understand why, so long as it was done within a promise.
- MaxBarraclough 5y agoInter-process communication is much, much slower than a native function-call. (Native function calls are almost free, especially on modern CPUs which are very good at dealing with them.) Spinning up a whole new process is vastly slower still, taking (iirc) hundreds of thousands of instructions. > so long as it was done within a promise. I don't see how it would help things to wrap it up with concurrency abstractions. That won't make the cost go away.