9 ms·
I've never used Rust, how would it compare to a C++ solution?
by sorenjan 11y ago
I've never used Rust, how would it compare to a C++ solution?
- hardwaresofton 11y agoBy what measurement? I think the only thing I could say would be that it would be safer? And possible terser and possibly easy to understand.
- grayrest 11y agoThe standard response from the Rust team is that Rust should match or beat non-SIMD C++ performance and if it doesn't, you should file a bug. Note: The first thing anybody will ask when you complain about Rust being slow is whether you compiled with optimizations turned on (`cargo build --release`) since it tends to make a 10-15x difference.
- im_down_w_otp 11y agoTheoretically the Rust borrow-checker also knows enough about your code's protection and dispatch semantics such that additional information could be used to create deeper optimizations than are available in either C or C++. Numerical analysis in Rust could compete with Fortran in performance, but I don't know if any of that has been actualized in Rust yet.
- viperscape 11y agoI think some of that might start to come along with increase in compiler plugins, which is feature gated to nightly build right now.