Benchmark 2025: Rust Leaves C++ and Go Behind in Performance

Online Python Trainer for Beginners

Learn Python easily without overwhelming theory. Solve practical tasks with automatic checking, get hints in Russian, and write code directly in your browser — no installation required.

Start Course

Benchmark 2025: Rust Leaves C++ and Go Behind



In early 2025, the developer community received a fresh independent benchmark that once again confirmed Rust's leadership in the system programming segment. The study, conducted based on real-world scenarios of data processing, web servers, and cryptography, compared Rust with its main competitors — C++ and Go. The results are impressive: Rust not only catches up with C++ in raw speed but also significantly surpasses it in safety, and outperforms Go by a large margin in performance and memory consumption.



Testing Methodology

The benchmark included three key scenarios:

  • JSON stream processing (100 thousand objects, serialization/deserialization)
  • SHA-256 hashing (1 MB blocks, 10 thousand iterations)
  • HTTP server (1000 concurrent requests, response with a 1 KB body)

All tests were conducted on identical hardware (Intel Core i9-13900K, 64 GB DDR5) with the latest stable versions of compilers: Rust 1.78, C++23 (GCC 13.2), Go 1.22. For the purity of the experiment, standard libraries were used without optimizations specific to a particular language.



Results: Speed and Memory

In the JSON processing test, Rust showed an average time of 2.3 ms versus 2.7 ms for C++ and 5.1 ms for Go. Rust won 15% over C++ and more than 55% over Go. At the same time, Rust's memory consumption turned out to be 30% lower than C++ and 2 times lower than Go, thanks to the absence of a garbage collector.

SHA-256 hashing demonstrated near parity between Rust and C++: Rust — 1.1 sec, C++ — 1.08 sec (difference less than 2%). Go lagged by 40%, completing the task in 1.54 sec. However, in this test, safety is more important: Rust guarantees the absence of buffer overflows and data races, whereas C++ requires manual memory control.

In the HTTP server, Rust showed 98,000 requests/sec, C++ — 92,000 requests/sec, Go — 71,000 requests/sec. Rust outperformed C++ by 6.5% and Go by 38%. Peak memory consumption for Rust was 120 MB, for C++ — 150 MB, for Go — 290 MB.



Why Does Rust Win?

Rust's key advantage is the ownership model, which allows the compiler to optimize code at the LLVM level without the overhead of a garbage collector. In 2025, Rust also received improvements in inline optimizations and SIMD support through the standard library, which closed the gap with C++ in low-level tasks. At the same time, Rust remains memory-safe — it is the only language among the three where segmentation faults and memory leaks are practically impossible at the compilation stage.



Conclusions for Developers

The 2025 benchmark confirms: Rust is not just a "trendy language," but a real tool for high-load systems. If you need maximum speed and predictable memory consumption without safety risks — Rust becomes the uncontested choice. C++ remains strong in legacy projects, but its complexity and danger of errors make Rust more promising for new developments. Go, in turn

Recommended Libraries