4 ms·
On par is an understatement. It beats C++ in 8 benchmarks and loses in 2. Quite impressive. Rust has more potential for better optimisation than C++ because th
by pkolaczk 7y ago
On par is an understatement. It beats C++ in 8 benchmarks and loses in 2. Quite impressive.
Rust has more potential for better optimisation than C++ because the compiler has full information on pointer aliasing.
- igouy 7y agoAlways look at the source code (or even the CPU load). One of those C++ comparisons is currently multi-core vs sequential. Several C++ programs were recently removed, which upends things. You might say — "there were faster than [Rust] versions that were rejected".
- pkolaczk 7y agoOne is multicore, but the other 7 winning have the same parallelism. As for that one winning by parallelism - maybe it was just easier to provide a correct parallel solution in Rust than in C++? This game didn't appear there yesterday and C++ developers had much more time to play it. If that's the case, that benchmark still counts.
- igouy 7y agoMaybe it was just that I contacted the Rust programmer and suggested they might like to update their program :-) (The changes were in the last month or two.)