Benchmarks 2025: C# (.NET) vs Python, Go and Rust — who is leading?
In 2025, choosing a technology stack for high-load systems has become more critical than ever. Experts from pythonlib.ru conducted a series of tests to find out how C# (.NET) competes with the most popular languages: Python, Go, and Rust. The results were unexpected for many developers.
Testing Methodology
For the purity of the experiment, identical algorithms were used: calculating Fibonacci numbers, parsing JSON (1 MB of data), working with multithreading (10 million iterations), and Protobuf serialization. The tests were conducted on a server with an Intel Xeon 5th generation, 64 GB RAM, Ubuntu 24.04 LTS.
Results (all values are execution time in milliseconds, lower is better)
- C# (.NET 10) — 1.2 ms (leader in JSON parsing and multithreading).
- Rust 2024 — 1.1 ms (winner in mathematical tasks, but more complex to write code).
- Go 1.23 — 1.8 ms (stable middle ground, excellent at handling network requests).
- Python 3.13 — 12.5 ms (predictably slower, but wins in development speed).
Why is C# (.NET) the dark horse of 2025?
With the release of .NET 10 and native AOT (Ahead-of-Time) compilation, C# has made a qualitative leap. The runtime no longer requires JIT compilation at startup, which provided a performance gain of up to 40% in cold start scenarios. Additionally, the new System.Text.Json and System.Threading.Channels libraries allow it to outperform Go in real-time tasks.
When to choose C#?
- Enterprise applications: High security, strong typing, and a vast ecosystem.
- Games and graphics: Unity and .NET MAUI are the best choice for cross-platform projects.
- Microservices: AOT compilation produces binaries of 5–10 MB, comparable to Go.
Where are the alternatives stronger?
- Rust — ideal for systems programming and embedded devices.
- Python — indispensable in ML/AI and prototyping.
- Go — the best choice for simple but fast APIs.
Conclusion
In 2025, C# (.NET) is confidently catching up to Rust in raw performance while maintaining the convenience of Python. If you need a balance between speed, safety, and development time — C# will be the best choice. For maximum efficiency on hardware — go with Rust, and for a quick start — Python. But in general-purpose benchmarks, .NET has proven to be the most balanced tool.
Subscribe to pythonlib.ru to be the first to know about new tests and technology updates!