Despite the name, the "Go Pro" code was never intended to be an example
of idiomatic or efficient Go. Robert asked me to take a look at his
code and I hacked on it for an hour to make a little bit nicer. If I
had realized that he was going to publish it externally I would have put
a lot more time into making it nicer.
I'm told that the program as compiled by 6g is significantly faster now
than it was when Robert did his measurements.
Ian
The program is not using appreciably more
memory than C++ dbg or Java.
Russ
> When I was looking at the benchmark I noticed the huge virtual memory
> for the Go version:
>
> Look at the Fig 7 data
>
> Virtual memory:
> Go 16.2 GB
> C++ Dbg 0.474 GB
> Java 1.1 GB
> Scala 1.1 GB.
>
> It looks like the GC is not keeping up, there is a memory leak or
> fragmentation.
>
> If the OS has spend a lot of time swapping out pages then this memory
> could lower the overall
> runtime performance too.
>
> Jeroen
Virtual memory is not essentially actual memory usage, swapped out; it
can be just things mapped into the address space. It itself is free, and
Go uses a lot of it in general, without impact on actual RAM usage.
While swap is one way of getting high VIRT usage, I doubt 16.2GB of it
would go unnoticed, or be doable without much, much poorer performance
in every other respect.
Bear in mind that 64-bit systems (6g) can address more than 4GiB of
memory, but 32-bit systems (8g) are limited to less than that in
addressable space.
They actually do look exactly alike. It's just less probable to find
a conflict.
> Would JVM languages have a similar issues or is the garbage collector
> there able to tell the difference between a pointer and a data value?
I believe Sun's JVM has exact GC.
--
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/blog
http://niemeyer.net/twitter
Bobby
Only lazy people write conservative GCs.
Russ
Just saw this post on hacker news https://days2011.scala-lang.org/sites/days2011/files/ws3-1-Hundt.pdf
.. hope u may interested... I wasn't too impressed with the analysis,
as some of the factors stands out for me
1. complexity. It may take years to get to Scala Pro standard, until
then the program would be a port of Java to Scala syntax. Also not
sure how maintainable is it.
2. Binary size. Of course, it is not linear as the size of runtime is
a constant overhead.
3. I am not sure what they mean by "a Go program is only valid if it
comes unmodified out of the automatic formatter gofmt". I think you
could always write with semicolon, spacing and compile withour gofmt.
thanks,
bsr.
import _ "net/http/pprof"
Nice! thnx!!!
The paper is not a good analysis of Go.