3 ms·
Why is Java faster than Go?
by _Codemonkeyism 8y ago
Why is Java faster than Go?
- cryptos 8y agoWhy should Go be faster? Both languages use a garbage collector and Java is highly optimized. Plus Java can be optimized even further at runtime.
- glangdale 8y agoBecause both are very similar languages and Java is way more mature? Go is essentially "Java, from Bell Labs".
- diakritikal 8y agoit's not: https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/go.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- mrweasel 8y agoJava, or more specifically the jvm have had some of the worlds smartest developers tweak every corner of the code for 20+ years. Java is faster (in some cases) because it's older and have been tested in pretty much any scenario... And it remains wildly popular, so development never stopped. Similarly Go and Rust are faster than Java in many cases, because the developers have been able to learn for past language like Java, and avoid the same performance pit falls. Or simply because they didn't have to deal with legacy support.
- Thaxll 8y agoJava is not faster than Go. Edit: Why I'm beeing downvoted, this very much benchmark linked show that Go is faster than Java in most scenarios: https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/go.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- benmmurphy 8y agoif you look at how the benchmarks run i suspect they would disadvantage java. java is known for having slow startup times and also an optimising JIT that takes a while to kick in. go is definitely going to be faster for some command line application that takes 20s to run but if you have a long running process i think it will be much closer.