I
I
Ivan Melnikov2019-02-22 20:09:36
Highload
Ivan Melnikov, 2019-02-22 20:09:36

Is it true that Rust is the future of high-performance applications?

How fast is Rust on average compared to C/C++?
Can Rust become faster than C/C++ in the future?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
I
inv2004, 2019-02-22
@inv2004

1) It would be more correct to say that Rust has the potential to replace high-performance C++ in the distant future.
2) Rust is at a decent level of performance relative to the pros, in some places it even overtakes, as an example of "overheated" tests, you can look here: https://benchmarksgame-team.pages.debian.net/bench...
3) Can it replace - this is a difficult question, maybe yes, maybe not, here, IMHO, several factors.
3.1) if we talk about maximum optimization (which already requires unsafe), then it is in unsafe code that there are no advantages over C ++.
3.2) when compared with popular languages ​​like Java/C#/Go, they are often not so far behind the growth and even pluses to switch to a more complex language.
3.3) A language partly determines its popularity due to many factors besides performance. Rasta has a high threshold of entry and great difficulty in writing, but great reliability. If it is unpopular, even if it is fast, then perhaps the niche will remain behind the pluses, if it suddenly starts to gain popularity for some reason, then it will probably be replaced.
As correctly written - we'll see in 10 years. A slightly different question is what needs to be done now so that the chances of replacing have increased.

S
sim3x, 2019-02-22
@sim3x

They love Java in trading There are
hundreds of thousands of links on Google for programming rust slowdown
In tiobe it is not in the top 20
Even if it overtakes everyone, then the wisdom of studying it for work is questionable

H
humbug, 2019-02-23
@humbug

> Can Rust be faster than C/C++ in the future?
Yes. Because the Rust compiler has more information about types, about aliasing , the lifetime of variables is calculated at compile time, and the ability to write multi-threaded code that will not fall from crooked hands. For example, rayon allows you to do things like this .
> Is it true that Rust is the future of high-performance applications?
Rust's goal is security, speed is a nice touch.
Well, is it worth teaching it or not, look at the facts:

  • Crypto exchanges write on Rust (reliability)
  • There are vacancies in Moscow time for 300k rubles per month on hand (yield)
  • In github, Rust is in the top 5 languages ​​by popularity, and on SO it is the most favorite language (interest)
  • https://www.techempower.com/blog/2018/06/06/framew... (performance)

V
Vitaly, 2019-02-23
@vt4a2h

How fast is Rust on average compared to C/C++?

The question is not correct at all, programming languages ​​are not horses.
...and again, not the right question.
The speed of writing a program or its execution depends on the programmer who writes the code and on many other factors, but not on the programming language itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question