News for hackers. Stuff that matters.
Re:Mozilla Welcomes the Rust Foundation by simias on Wednesday February 10, 2021 @11:59AM (#26091726)
It's not really scientific but if you look at the language benchmark game Rust is generally toe-to-toe with C++ without requiring any unsafe code.

Here's a random example: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Rust is pretty damn close to the fastest C++ version without any unsafe (but using a bunch of generic libraries which may have unsafe code, to be perfectly fair).

Note that the winning C++ entry is also vastly more complex code and I wouldn't want to have to maintain that.

The n-body benchmark is even more in Rust's favour: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Here Rust wins the benchmark without unsafe or non-std dependencies. I also find the code very readable and natural looking.

Disclaimer: I love Rust so much that I wish that I could marry it, I'm obviously thoroughly biased.

Re:Mozilla Welcomes the Rust Foundation by pumpkinpal on Friday February 12, 2021 @01:15AM (#26111181)
The n-body benchmark is slower due to a a bug in GCC's vectorization compared to Clang/LLVM.