Re:Go’s march to low-latency GC
by richard_todd on Wednesday July 06, 2016 @12:32PM
(#12044176)
I think for "small-data" programs it does work out to about an order of magnitude of overhead in Java. I have ported several small Java programs to Go and I see it (like 100MB Java vs 8MB Go). One encryption program I coded multiple versions of ran 350k C vs. 1.3MB Go vs. 16MB Java.
Programs holding GBs of data in arrays would look much closer, though, I imagine, as the overhead would be dwarfed by the data itself.
Possible. But typically idiomatic Java usage patterns with collection types have huge overheads. So unless Java code is written in specially memory efficient way that memory usage gap should remain
https://www.cs.virginia.edu/kim/publicity/pldi09tutorials/me...
In my experience it does use less memory than Java. I had application written in Java which i migrated to Go and i see less memory usage.
Well depending on program. Here is what I see.
"When there's a big disparity between those Java and [Go] programs, it's mostly the default JVM memory allocation versus whatever [Go] needs."
http://programmers.stackexchange.com/questions/189542/is-mem...
I looked at this:
http://stackoverflow.com/questions/5673388/what-is-the-small...
For me using Java 1.8 the number is around 1.5MB. Something similar in Go is 60KB
Google wrote a paper comparing C++, Java, Scala, and Go and definitely did not find that (https://days2011.scala-lang.org/sites/days2011/files/ws3-1-H...).
I like Go and it has many wonderful qualities. Still, it's important to be realistic.