4 ms·
You're conflating "optimized" with "optimizing". The observation is that Java and C# depend on a _very_ sophisticated runtime (including a JIT compiler) to perf
by weberc2 8y ago
You're conflating "optimized" with "optimizing". The observation is that Java and C# depend on a _very_ sophisticated runtime (including a JIT compiler) to perform comparably to Go which has a comparably simple runtime. I don't know that the point is a strong one; I'm just trying to clarify the conversation.
- pjmlp 8y agoYou mean outperforming Go, actually. https://www.techempower.com/benchmarks/#section=data-r17&hw=ph&test=query https://www.techempower.com/benchmarks/#section=data-r17&hw=...
- hu3 8y agoNot to contradict your point but be careful on putting too much weight on microbenchmarks for they are implementation sensitive. For example, here you can see Go on par, if not faster, than other stacks: https://www.techempower.com/benchmarks/#section=data-r17&hw=ph&test=plaintext https://www.techempower.com/benchmarks/#section=data-r17&hw=... I consider a good number of modern platforms fast enough for most uses. When tight requirements arise, which is rare, I resort to PoC implementations rather than microbenchmarks. There's a lot to more to consider than raw performance.
- weberc2 8y agoI don't, actually. One microbenchmark isn't conclusive (never mind that Go is outperforming C# according to The Fine Microbenchmark).
- pjmlp 8y agoGo looses against Java in all of them, which was also mentioned by you. And there are plenty of variations to chose from.
- stcredzero 8y agohttps://www.quora.com/Is-he-looses-an-arrow-grammatically-correct https://www.quora.com/Is-he-looses-an-arrow-grammatically-co...
- pjmlp 8y agoThanks.
- weberc2 8y agoThere are not "plenty of variations"; they all measure roughly the same things--web framework, Postgres driver, JSON library. Go's postgres and JSON libraries are probably not well-optimized. Even if this isn't the case, at best it means that Java has a higher ceiling--it doesn't tell us about whether average Java code is faster than average Go code, nor does it tell us about how difficult it is to optimize code in each language such that it approaches its respective ceiling. Here are some more microbenchmarks that show Go and Java at about the same performance, and the rules of the game prohibit idiomatic Go optimizations (hence the poor performance on binary-tree; regex-redux is slow because Go's regex library is famously unoptimized). For real-world programs, Go and Java are in the same ballpark.