3 ms·
I've found that depending on that "key part", you can actually offload the task to another process (written in C/C++/Rust) via RPC. The end result was a signifi
by pthread_t 5y ago
I've found that depending on that "key part", you can actually offload the task to another process (written in C/C++/Rust) via RPC. The end result was a significant performance improvement.
- mattgreenrocks 5y agoUsing something like PyO3 for Rust/Python integration really helps with this, and you don't need the conceptual overhead of RPC.
- joshuamorton 5y agoInteresting, I find that the conceptual overhead of pyo3 (or cytpes) is often higher than making a local rpc
- IshKebab 5y agoI work on a system like that and it just means you have to deal with a load of complicated FFI stuff and you end up with a C++ program that happens to have some slow parts awkwardly implemented in buggy Python.
- makecheck 5y agoI find that subprocesses are primarily valuable for stability and security, e.g. dealing with something that might crash (killing only the subprocess) or something that requires different privileges than the main process. And yet, the communication to (and possibly from) the child incurs a cost that cannot be ignored, more than what a simple wrapper to another language would have.