Hacker News new | comments | show | ask | jobs | submit login

I like Go, but it's not dramatically faster than Java. Any contest between the two of them will probably just be a back and forth of optimizations. They share pretty much the same upper bound.

Speed is not everything however, when it comes to memory usage, Java has a serious disadvantage.

Given a specific machine with a set amount of cpu, ram, and io bandwidth, I find I can easily do more on that machine with go than java.

Also, try running multiple java processes on a machine as opposed to multiple go programs.

I tend to agree from the naive Java approach, but with Java and multiple processes on the same machine they really should share a single JVM. Many people end up having one JVM per process. But the go runtime is less greedy and supports that logical thinking much more obviously.

So could I. I imagine a Java aficionado would say the opposite. Like I said, different ways to think about the problem.

To the posters point about running multiple Java aaps on a single machine, I think ram is the real issue. Java makes in my experience far less frugal use of it. I've seen Java applications eat hundreds of mbs of ram rewritten in Go using 1-2 mb.

Every time I hear this conversation play out, the Java folks point out that the GC is highly tunable/pluggable, so you can shift some levers and get lower memory consumption in exchange for more frequent collections. I'm not a GC expert, so I'm just repeating what I've heard.

This is true. The Java GC (and the whole VM) is one of thr most impressive pieces of software in existence. There are several GCs available, they're tunable, and they support monitoring better than any other I've seen.

No GC I know is happy without a heap several times larger than the program's requirements.

OTOH, Java programs tend to be built using frameworks that soak up memory like crazy. So there's that.

I believe that Go's GC currently bounds heap memory usage to 2x the actual usage (worst case).

Exactly. Go app uses much less RAM than Java app.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact