Hacker News new | ask | show | jobs
by bufferoverflow 2684 days ago
Rust is slower than C++. Firefox got faster because it got optimized, not because of Rust.
4 comments

This is a common misconception. In key benchmarks, it is the same speed (a few still lag, but not due to inherent weaknesses in the language). Earlier versions of rust were slower because the compiler didn't have the insane optimizations that many C++ compilers have.

In fact, it may be easier for developers to write code that runs faster with rust than C++, thanks to much error and exception handling code that you simply do not need in Rust.

Most importantly, however, is finding Rust developers who are experienced enough to write high-performance Rust. I would imagine that it's a lot easier to find C++ devs.

> Rust is slower than C++

It may be, but there's also the concurrency aspect which is hard to get right in C++. That's where the performance gains come from, partially, because 'fearless concurrency' is one of the Rust's tenets.

> Rust is slower than C++.

That's a bold claim to make without any justification!

Most come from concurrency. Rust make them easier.