How fast will Rust get in the future?


#1

What’s the outlook of Rust’s performance in the near future?
I see that there are many non-core developers working on on this daily but I just wanna know sort of like a schedule if they have one.
I know Rust as of now in competitive with C/C++, I just want to see the outlook for the future!

~Thanks!


#2

Nothing is stopping Rust from being Blazing Fast™ .

The goals right now are on feature maturity, and hopefully post 1.0 we can work on better generated IR, which can be better optimized by LLVM, along with some other optimizations, such as the discriminate_value intrinsic that has been proposed.


#3

It’s currently very hard to write allocation-less code in Rust, it might be competitive with C, but this is an area where Rust is still lacking (where buffers are involved, without dropping down to unsafe code). Many things in the standard library return String or Vec instead of taking a parameter to write the result to, resulting in unneeded allocations.


#4

Thanks for the feedback! so it seems that there is room to improve Rust’s performance and will probably start this improvement post 1.0 when everything is stable.


#5

One thing that’s important is that we’ve considered performance during every step of designing the language semantics. While we haven’t been able to implement everything yet, it’s always an important factor considered in design, though correctness is a slightly more important one.