Re:Ask HN: No BS, which is actually faster C++ or Rust?
by richrichie on Sunday May 26, 2024 @03:45AM
(#40480366)
>it's become far too complicated with people using like 10% of the features
Isn't Rust getting on the same boat fast?
Specifically, it's LLVM vs all the other C++ compilers.
C++ compilers like GCC generate more optimized asm for some things. Other things LLVM does better than GCC, but so does C++ compiled with LLVM.
C++ is a fantastic language, but it's become far too complicated with people using like 10% of the features, but everyone uses a slightly different 10%, and no one can really know more than 20%... cpp2 is trying to address this, but in the meantime you have new entrants looking to take over the real-time space (rust, zig, etc.)
The honest no BS answer is: it depends... more specifically, you need to do your own benchmarks specifically on the bottlenecks you expect your project to face.