- https://blog.plan99.net/modern-garbage-collection-911ef4f8bd...
- https://blog.plan99.net/modern-garbage-collection-part-2-1c8...
The main takeaway is that saying that Go is the leading GC is just a (somewhat dishonest) PR move, and Go's team made a pretty good GC given there project constraints, even of it is not at the state of the art at the moment.
You know when you end your article with "Overall, it looks to me like the Java guys are winning the low latency game." when none of those GC are actually production ready ... Go GC low latency has been stable and used for some time now.
Out of the box Go GC is very good and doesn't need all the memory or the tunning from G1. ( I spend years tunning GC for Java application it's a nightmare )
And isn't Shenandoah included by default in OpenJDK 12+?
Oracle chooses to build with only ZGC enabled.
I would not be surprised if the difference in amount of "garbage"—as measured in either bytes or object count/mark time—were a lot smaller than people think.
Although most of the benchmarks I've seen are at lease 2 years old. It would be nice to see some updated benchmarks that also compare against the Shenandoah and ZGC garbage collectors for the JVM.
That's how you get from zero to heavy usage in companies like Uber, Twitter, Cloudflare, BBC, Basecamp, Canonical etc... in less than a decade.
Not to mention technology change always generate friction. You just can't please everyone.
Hype driven development is a thing.
Unless technology X is irrelevantant.
But real-world applications performance needs fine tuned libraries that scales and this is where Java destroy both go and c#.
I ran several benchmarks locally on a CPU that's a few years old where the benchmarks site shows golang being faster than Java, without changing the code, and I got the opposite result (Java was faster). Especially the longer the program ran. For example, the site shows that golang is faster in the spectral norm benchmark. Running it locally with a larger input parameter:
golang:
time ./test 30000
1.274224153
18.81 real 70.19 user 0.38 sys
Java: time java spectralnorm1 30000
1.274224153
16.18 real 105.95 user 0.45 sys
Or with the nbody benchmark:golang:
time ./nbody 60000000
-0.169075164
-0.169012474
6.09 real 6.04 user 0.02 sys
Java: time java nbody 60000000
-0.169075164
-0.169012474
6.04 real 5.94 user 0.06 sysThings should get more interesting once Java gets green threads, which would make it easier to implement high performance concurrent servers without needing to drop down to event driven code unless for specific needs. That, and with value types, should push the performance bar forward.