Live data from Hacker News

Java vs. Go performance

benchmarksgame.alioth.debian.org

1–10 of 69 posts

Re: Java vs. Go performance

#4
This is a pretty eye opening chart. I know the Go guys have a philosophical point about wanting to be able to reason the whole source code as the justification for the Plan 9 and later GCC only stance, but I do have to think that these numbers are poor enough that a LLVM port should be investigated.

I also think that it's a good think for Go that Apple hasn't open source'd swift. I suspect it would thrash Go here.

Re: Java vs. Go performance

#5

This is a pretty eye opening chart. I know the Go guys have a philosophical point about wanting to be able to reason the whole source code as the justification for the Plan 9 and later GCC only stance, but I do have to think that these numbers are poor enough that a LLVM port should be investigated. I also think that it's a good think for Go that Apple hasn't open source'd swift. I suspect it would thrash Go here.

Maybe I come from a different world, but these numbers seem pretty good. If you compare C++ and Go, C++ is 3x-1x faster than Go using more code.

For most applications that you'd expect to use Go for, that's decent efficiency at a smaller memory footprint than Java. Enough, certainly, to make a high-performance server that uses less RAM than Java and less code than C++.

Re: Java vs. Go performance

#6
Look, Java is my right hand language, and I've never written a single line of Go in my life.

But this is kind of unfair I think... the OpenJDK JVM has 20 years of development behind it, and has probably had mountains of money sunk into tuning f* out of it by the biggest most enterprisy players in the game.

I'm sure that there is a lot of low hanging fruit for Go to grab at to improve performance, and most likely will. I can't stand benchmarks like this.

Oh yeah, and Java FTW ;)

Re: Java vs. Go performance

#7

This is a pretty eye opening chart. I know the Go guys have a philosophical point about wanting to be able to reason the whole source code as the justification for the Plan 9 and later GCC only stance, but I do have to think that these numbers are poor enough that a LLVM port should be investigated. I also think that it's a good think for Go that Apple hasn't open source'd swift. I suspect it would thrash Go here.

There is only one where Go is 3 times slower, regex-dna. That would either be because of the speed of the regex implementation or the GC for the allocations. Apart from that Go is similar or twice as fast for reverse-component. Note that Go uses less memory for tasks that require memory to be allocated too.

Go is doing better at the benchmarks game than it has in the past.

Re: Java vs. Go performance

#9
post #6

Look, Java is my right hand language, and I've never written a single line of Go in my life. But this is kind of unfair I think... the OpenJDK JVM has 20 years of development behind it, and has probably had mountains of money sunk into tuning f* out of it by the biggest most enterprisy players in the game. I'm sure that there is a lot of low hanging fruit for Go to grab at to improve performance, and most likely will…

My understanding is that Go has a very simple optimizer. They were waiting for all the C code in the compiler to be translated to Go, which I believe was done in the last release.

Re: Java vs. Go performance

#10

This is a pretty eye opening chart. I know the Go guys have a philosophical point about wanting to be able to reason the whole source code as the justification for the Plan 9 and later GCC only stance, but I do have to think that these numbers are poor enough that a LLVM port should be investigated. I also think that it's a good think for Go that Apple hasn't open source'd swift. I suspect it would thrash Go here.

I don't get it - is this because you think Java has poor performance?

I for one suspect that Swift does not exceed Java in throughput either and in fact I'd bet that the performance of Swift is worse.

Post reply on HN