3 ms·
> Part of that may be second system syndrome It may be that they've implemented it differently in a way that is more performant but has fewer features. A "ru
by themafia 1y ago
> Part of that may be second system syndrome
It may be that they've implemented it differently in a way that is more performant but has fewer features. A "rust port" is not automatically or apparently a 1:1 comparison.
- tialaramex 1y agoIt could be, but it's often just that the things you got in the box were higher quality and so your results are higher quality by default. Better types like VecDeque<T>, better implementations of common ideas like sorting, even better fundamental concepts like providing the destructive move, or the owning Mutex by default. Even the unassuming growable array type, Rust's Vec<T>, is just plain better than C++ std::vector<T>. It's not a huge difference and for many applications it won't matter, but that's the sort of pervasive quality difference I'm talking about and so I can well believe that in practice this ends up showing through.
- vlovich123 1y agoThere’s also compiler optimizations that aren’t available in c++ - noalias automatically applied everywhere + the compiler automatically optimally laying out structs is probably a non trivial perf add as well.