r/java • • Jun 10 '24

[deleted by user]

[removed]

612 Upvotes

594 comments sorted by

View all comments

Show parent comment

1

u/thecodeboost Jun 11 '24

I agree with you but just to put some meat on the bone with regards to speed. There are two relevant speed metrics; how fast does an averagely skilled developer write production level code for that language, and how fast is that code executing on average hardware for it's domain of applicability.

Java is faster than Golang and Typescript/Javascript on the former objectively (especially Golang takes productivity hits as your codebase or team grows in my experience). Execution speed will depend a bit what your code is doing but there are literally zero benchmarks where TS/JS code will outperform Java code, and very few where Golang will outperform Java code. People wildly underestimate the maturity and effectiveness of modern JVMs JIT optimizing running code. Even in performance benchmarks Java is only a few % slower than Golang and that's with academic performance code. Real world code is not typically written with performance as its primary success factor. And all else equal the JVM is probably doing a better job at efficiently burning your CPU cycles than your handwritten Golang code does.