Benchmark 2025: Java vs Go, Python, and C# — Which is Faster?

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: Java vs Go, Python and C# — results that surprise



At the beginning of 2025, the PythonLib team conducted a series of independent tests to evaluate the real performance of Java compared to its main competitors: Go, Python (3.13) and C# (.NET 9). With the growing popularity of microservices and cloud solutions, the choice of language becomes critical. We tested four key scenarios: computation, REST API handling, JSON parsing, and container cold start.



Testing Methodology

All tests were performed on identical hardware: Intel Xeon 4 cores, 8 GB RAM, SSD NVMe. The latest stable versions of compilers and runtimes were used. For Java — OpenJDK 21 with G1GC, for Go — 1.22, for Python — 3.13 with JIT optimizations, for C# — .NET 9 with AOT compilation.



  • Test 1. Computational Load — calculating the 1000th Fibonacci number and multiplying 500x500 matrices.
  • Test 2. REST API (HTTP/1.1) — 10,000 requests under load, measuring response time.
  • Test 3. JSON Parsing — reading and serializing a 50 MB file.
  • Test 4. Cold Start — time from launch to readiness for the first response.


Results: Java — absolute leader in stability

In the computational test, Java showed the second result, losing to C# by only 5%. However, when working with JSON, Java outperformed C# by 12% and Go by 7%. Python, despite the new JIT, turned out to be 8 times slower than Java on matrix operations.



The most unexpected result was in the REST API test. Java with virtual threads (Project Loom) demonstrated minimal latency — 0.8 ms per request. Go showed 1.1 ms, C# — 1.3 ms, Python — 4.5 ms. At the same time, Java consumed 15% less memory than Go and 30% less than C#.



Cold Start: Java's weak point? Not anymore

Traditionally, Java has been criticized for slow startup. However, GraalVM Native Image in 2025 changes the game: the startup time of a Java application was 0.6 seconds — only 0.2 seconds slower than Go and faster than C# (0.9 s). Python starts the fastest (0.1 s), but loses in performance.



Conclusions for Developers

The 2025 benchmark confirms: Java remains the best choice for enterprise systems where predictable performance and scalability are important. Go is ideal for simple microservices, C# for the Microsoft ecosystem, Python for prototyping and ML. But if you need a balance of speed, memory and stability — Java is still unrivaled.



Full test data (tables, graphs and code) are available in the PythonLib repository in the "Benchmarks 2025" section.

Recommended Libraries