Rust vs C++ Performance: Can Rust Actually Be Faster? (Pt. 2)

Rust vs C++ Performance: Can Rust Actually Be Faster? (Pt. 2)

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI

Оглавление (1 сегментов)

Segment 1 (00:00 - 03:00)

In this quick update video, I compare the Actix framework in Rust with Boost. Beast in C++. I got a pull request with C++ improvements. Now it uses coroutines instead. Let’s see if it makes any difference. It’s a relatively old framework that I'm comparing with Rust, and in a few days I’ll also compare modern C++ frameworks such as Seastar, Userver, and Drogon, and on the Rust side, Actix, Axum, May, and Ntex. If you want me to compare other frameworks, just raise a PR and I'll test them as well. Let’s go ahead and run a test. I use m7a. large EC2 instances in AWS with 2 CPUs and 8 GB of memory. I use AWS to closely simulate a production environment that most of you have, rather than using my home lab to test. As always, I run the test for about an hour or two and just compress it to a couple of minutes for you. Alright, let me run it for 1 more minute and we’ll go over each graph one by one. Well, unfortunately, that change in C++ didn’t make any difference. This time Boost. Beast reached around 90,000 requests per second; in the previous test it was like 89 or something—not a big difference. Rust on the other hand reaches the same number of requests per second. Next, we have latency, and the trend is pretty much the same. C++ has slightly higher latency, and it’s mostly due to the framework implementation and not C++ itself. C++ and Rust are very low-level languages, and the implementation plays a huge role in those frameworks. I really do, at the end of the day, compare frameworks and not the languages themselves. In the next video, I’ll do either C++ frameworks or Rust frameworks and then compare the winner with each other.

Другие видео автора — Anton Putra

Ctrl+V

Экстракт Знаний в Telegram

Экстракты и дистилляты из лучших YouTube-каналов — сразу после публикации.

Подписаться

Дайджест Экстрактов

Лучшие методички за неделю — каждый понедельник