4 ms·
I had the same feeling as a C# developer. I took some weekends to write an algorithm (Monte Carlo financial simulation) in Rust, Go, JavaScript, and C#. You sho
by noveltyaccount 4y ago
I had the same feeling as a C# developer. I took some weekends to write an algorithm (Monte Carlo financial simulation) in Rust, Go, JavaScript, and C#. You should do something like that.
What I learned is that Rust has by far the best runtime and memory performance, but .NET Native AOT was second best (even better than Go!) and JavaScript was 30x slower than Rust.
But Rust took me probably over 40hrs (hard to say because I worked on it little by little), the learning curve was steep. Its standard library is spare, and selecting the "best" community crate leads to decision fatigue. I banged out the same algorithm in my most proficient language (C#) in an afternoon.
In business, speed to deliver almost always trumps speed of code runtime. Some algorithm hot spots deserve the Rust treatment, but in general, just ship the code to your customers.
That's a long way to say, put some energy into learning Rust sure, but don't beat yourself up about it. It's not a general purpose language like Go or C#. It's a dream for performance critical algorithms.