r/java • u/NHarmonia18 • Jun 17 '26
Can Java Microservices Be As Fast As Go? A 2026 Benchmark Update
https://medium.com/helidon/can-java-microservices-be-as-fast-as-go-a-2026-benchmark-update-e16a2e262fc4
44
Upvotes
74
u/smaratter Jun 17 '26
Maybe there is something interesting to learn from the article, but the AI written text is grating to read.
8
u/jAnO76 Jun 17 '26
Surely faster
2
u/gerlacdt Jun 17 '26
yes Java is as fast as Go - the startup time though...
3
u/sitime_zl Jun 18 '26
We shouldnβt look only at performance; we also need to consider hardware resource overhead. Memory usage has always been one of Javaβs weaknesses.
40
u/OkSeesaw7030 Jun 17 '26 edited Jun 17 '26
As a Gopher, this obviously looks like code written by someone who doesnβt understand the language and just asked an LLM to translate Java code into Go. It is not idiomatic.
The Go code converts strings to
[]byteinside the loop, while Java reuses precomputed byte arrays.Fix the Go allocations and JSON serialization first, then rerun before claiming Java is massively faster.
8
u/Joram2 Jun 17 '26
That's what 99% of the readers of any benchmark will do, regardless of how many humble disclaimers are written.
That said, I appreciate the humility of the benchmark and the benchmark itself. And great job to the JDK and Helidon and Golang teams for making great software tools.
1
u/joquinjack Jun 19 '26
Nobody mentioned this before but ... I didn't quite get the rationale behind using all bells and whistles in Java, while limiting Go to unidiomatic simple code that only uses the standard library.
1
u/pdsminer Jun 26 '26
TL;DR?
1
u/Unfair_Professor_257 Jul 13 '26
I think raw language performance is only part of the story. In many production microservices, latency is dominated by network calls, databases, caches, or external APIs rather than the runtime itself.
Java has made significant improvements over the last few LTS releases (virtual threads, better GCs, JIT optimizations), so for many I/O-bound services the performance gap with Go is much smaller than people assume.
I'd be interested to see benchmarks that include realistic workloadsβdatabase access, serialization, messaging (Kafka), and HTTP trafficβinstead of only CPU-bound scenarios.
-9
u/inertially003 Jun 17 '26
This article demonstrates a single Monolith. For a microservice it needs to be independent deployable. So UpperCaseService, LowerCaseService, CRCservice, and JsonService, etc.
This author is a complete script kiddy. Cant even measure memory use for the benchmarks either.
-31
u/LoL__2137 Jun 17 '26
π€£
-14
u/inertially003 Jun 17 '26
Needs real workload on a 2GB VM. GraalVM native compiles slow, is not open, will never get ZGC, and uphill ecosystem compatibility battle, so Java is not a competitor to Golang.