2 ms·
There is a discussion from a year ago that compares them here: https://www.reddit.com/r/golang/comments/5j7phw/modern_garbage_collection/ https://www.reddit.co
by mike_hearn 8y ago
There is a discussion from a year ago that compares them here:
https://www.reddit.com/r/golang/comments/5j7phw/modern_garbage_collection/ https://www.reddit.com/r/golang/comments/5j7phw/modern_garba...
Note that latency isn't the only metric that matters! The top comment from that discussion says this:
There were tests lately in which Go GC was almost the fastest latency wise. Go was was couple of times faster than Java in mean latency time but it had 1062 pauses comparing to Java G1 GC which had only 65 pauses. Time spent in GC was 23.6s for Go but only 2.7s in Java. There is no free launch, you need to pay for low latency with throughput.
More detail from the same guy:
"Go: 67 ms max, 1062 pauses, 23.6 s total pause, 22 ms mean pause, 91 s total runtime
Java, G1 GC, no tuning: 86 ms max, 65 pauses, 2.7 s total pause, 41 ms mean pause, 20 s total runtime"