2 ms·
> I think it is, especially for higher level software. People are rewriting I/O bound applications from garbage collected languages and the top two reasons they
by Hermitian909 4y ago
> I think it is, especially for higher level software. People are rewriting I/O bound applications from garbage collected languages and the top two reasons they cite are performance and memory safety - it's just peak stupidity.
One failure mode I see lead to this in JS is that sometimes you have a program that is usually IO bound but certain paths are CPU eaters. If the CPU eating workload is entirely synchronous this interacts badly with the event loop architecture because there's no scheduler (at the JS level) to interrupt the workload and handle outstanding IO work. My guess is that many devs are unable to diagnose this issue correctly and jump straight to Rust.
The sweet spot for Rust in high level software really seems to be using it in small doses. My shop is 99% JS but just a little bit of Rust in the right places gamechanger: millions of savings in cloud spend, big UX improvements on key workflows, new architectural capabilities. I don't know if we would have taken the plunge with C++ for most of those cases out of fear of the potential operational issues.
- miohtama 4y agoNowadays it is easy to mix in Rust in higher level languages. If there are certain critical paths only those paths can be rewritten in Rust or offloaded to a separate process.
- Xenoamorphous 4y agoWhat about worker threads? When I’ve hit some CPU intensive task in Node I simply offload it to them.