3 ms·
It's still not there yet, but getting close. And Rust is really the only language that has come close. In terms of performance, it's really the only language o
by saosebastiao 9y ago
It's still not there yet, but getting close. And Rust is really the only language that has come close.
In terms of performance, it's really the only language out there that can claim to be as fast as C/C++. It has a minimal runtime, with the option of no runtime. It has pretty great FFI and can produce easily callable libraries for other runtime-heavy languages.
It's not, however, as broadly compatible as C. I don't think that's a problem for most cases, as most programming is now done for (MIPS|ARM|X86|X86_64), and it can handle those well enough. But microcontrollers and OS-less embedded devices still have a ways to go before Rust beats out C.
And stability is just not there. IMO, that's a good thing. Rust is the best thing to happen to systems programming in a really long time, and there are still tons of ideas with amazing potential benefits. The Rust community has been exceptional at guiding this development. I'm sure some day it will level off, but until then, I'm happy with it changing pretty rapidly.
- pcwalton 9y agoI don't think "stability" and "changing rapidly" are incompatible notions. Stability implies that code written today continues to work years from now on later versions of the compiler and language. Rust has always (well, since 1.0) striven to provide stability in that sense, despite the rapid pace of language improvement.
- cat199 9y ago> most programming is now done for (MIPS|ARM|X86|X86_64) but not necessarily posix/windows/etc having C as a least-common-denominator toolchain which almost all platforms will provide is still useful for the embedded world where sqlite has a huge number of applications..
- tmzt 9y agoRust has a complete #nostd mode where most of it's ergonomics are still usable without any runtime. It also supports pluggable allocators, as well as replacing most of the builtin functionality of other language components (lang items). It's story around panic and debug handling is also improving, including cutting out formatting code for things like println! and debug! when targetting embedded platforms.
- nick_ 9y agoYou may want to check out Pony :)
- tekknik 9y agoIt’s also not as fast as C/C++ in all cases, only in some. http://benchmarksgame.alioth.debian.org/u64q/rust.html http://benchmarksgame.alioth.debian.org/u64q/rust.html
- steveklabnik 9y agoThe biggest differences there are due to lack of SIMD. We expect it to be stable quite soon, and that should close the gap quite a bit.
- igouy 9y agoDo you say that because you have coded those programs using SIMD and rustc nightly, and seen that using SIMD eliminates the performance difference ?
- steveklabnik 9y agoI have not personally done this, but the people who have identified that as the issue, and what we’re stabilizing is the exact same thing as what C and C++ compilers have, so there’s no reason to believe it would be different. Once it’s stable, we’ll all see!
- igouy 9y agoSomeone has repeatedly commented on /r/rust/ that differences are due not so much to SIMD but iirc to not triggering the same LLVM loop unrolling.
- steveklabnik 9y agoI think you're confusing loop unrolling and autovectorization. That said, it's kinda moot, once SIMD is stable, we'll find out :)
- igouy 9y ago