C# (.NET) 2025 Benchmark: Performance Comparison with Market Leaders

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: How C# (.NET) Outpaces Competitors in Speed and Efficiency



In early 2025, the independent lab TechEmpower and the BenchmarkDotNet community published a large-scale study of the performance of modern programming languages. The focus is on C# as part of .NET 9, which unexpectedly for many surpassed recognized leaders in web development, computing, and data processing. We analyze the key results.



Testing Methodology

The tests were conducted on servers with 5th generation Intel Xeon, 64 GB RAM, and NVMe drives. The following were measured:

  • HTTP request processing speed (JSON serialization, working with PostgreSQL database, template rendering)
  • Computational tasks (matrix multiplication, sorting, cryptography)
  • Memory consumption and garbage collection speed


Winners and Losers

In the "Multithreaded Web Server" (Plaintext) category, C# on ASP.NET Core showed 1.2 million requests per second, surpassing Go (1.05 million) and Java Spring (980 thousand). Python (FastAPI) showed 120 thousand requests — a 10x lag. In JSON serialization, .NET 9 used the built-in System.Text.Json, which turned out to be 40% faster than Java analogs (Jackson) and 3 times faster than Go (encoding/json).



Computational Tasks: Unexpected Leader

  • Matrix multiplication (1000x1000): C# (SIMD instructions) — 0.34 sec, Rust — 0.31 sec, Go — 0.78 sec, Python (NumPy) — 1.2 sec.
  • Cryptography (SHA-256): .NET 9 outperformed Java by 22% due to optimization of the Tiered PGO JIT compiler.
  • Garbage Collection: In .NET 9, GC pause time was reduced to 0.3 ms — this is close to Rust's figures (0.1 ms) and better than Go's (0.8 ms).


Why Did C# Leap Ahead?

Key success factors for .NET 9 in 2025:

  • Native AOT: Compilation to native code without JIT delays. Binary size decreased by 60%, startup time — down to 15 ms.
  • Dynamic PGO (Profile-Guided Optimization): Automatic optimization of hot code paths during execution.
  • Vectorization: Use of AVX-512 for numerical calculations.


What Does This Mean for Developers?

If you need speed close to C++, but with managed memory and a rich ecosystem — .NET 9 becomes the #1 choice. For microservices, Real-Time systems, and high-load APIs, C# now offers the best balance of performance and development convenience. Python remains the king of prototyping and ML, but in production RPS (requests per second) it lags by orders of magnitude.



Full benchmark tables are available on GitHub ASP.NET Benchmarks. We recommend running your own test on your project — results may vary depending on the workload.

Recommended Libraries