logoalt Hacker News

prontoday at 7:33 AM1 replyview on HN

From your description it sounds like you're comparing an old Java program running on an old JDK with a new Go program running on a new Go runtime. These days Java has virtual threads (similar to Go's goroutines) and doesn't need a "reactive stack", and its optimising compiler and GCs blow Go out of the water without breaking a sweat.


Replies

HendrikHensentoday at 7:47 AM

I mean, what is old? How far along are frameworks these days, and what are companies using?

That team was using Java 17. Java 21 was just released and frameworks had no meaningful support for virtual threads whatsoever.

In my experience, most companies using Java are chronically multiple versions behind (e.g. some of my friends still in the Java world are on 11).

Perhaps you can share some sources which prove that Java's performance blows Go out of the water without breaking a sweat? I have not seen any such articles about that in the past 3 years, besides the cherry-picked cases where the JVM JIT can optimize some small algorithmic part of the program on the fly (which is not relevant in most web applications).

I'm happy to stand corrected.

Edit: I found this one using a quick search myself https://medium.com/@mohnisha/java-vs-golang-performance-test... I'll check it out and see if I can reproduce it myself too. Still too bad about that gargantuan memory usage, but I guess memory in the cloud is cheap.

show 1 reply