5 ms·
I don't claim to be an expert on it, but I'm not uninformed either. Yes, I'm aware of many implementations and variations. With various talks from vendors that
by thomashabets2 1mo ago
I don't claim to be an expert on it, but I'm not uninformed either. Yes, I'm aware of many implementations and variations. With various talks from vendors that rant about "a mostly-pauseless GC is one that sometimes pauses!! Ours is a pauseless compacting GC".
But per my linked blog post (that you did read?) I do go into Java language problems that make GC impact worse.
The care and feeding of the Java runtime environment, entirely a self inflicted problem, that goes from selecting one and tuning ALL its parameters, kind of proves my point. It's not just knobs, but whole runtime environments. If there had been "a best one" with no knobs, that "just works", then fine. But there isn't.
- pjmlp 1mo agoYes, I read it, hence the reply. Ignores that Java had escape analysis years before Go happened, granted the quality depends on which JVM is actually used, e.g. GraalVM is better than OpenJDK, and there are others to chose from. Ironically Go designers got educated why GC knobs are relevant, and why a single GC doesn't solve all use cases. And it doesn't need an advanced GC, so Green Tea rewrite was wasted work? You can do off heap allocation in Java with Unsafe, JNI, ByteBuffers, and more recently Panama. This not taking into account the APIs provided by real time Java specification. Finally with Valhalla design now being merged into the language (Java 28+) we get explicit value types, while Go still needs to rely on compiler warnings for failed escape analysis. And the remaining Java rant could be further deconstructed. However your blog clearly points out where you stand in regards to Java, so maybe some unwillingness to learn the ecosystem was part of it.
- EGreg 1mo agoAnyway. This is all a bunch of irrelevant details. The original point I had made was that you don’t need GC at all, if you just have a canonical direction for references and make sure that the other directions have only weak references.
- thomashabets2 1mo ago> Ignores that Java had escape analysis years before Go happened Yeah, because I don't think that matters. I do assume that Java has most of the state of the art GC work applied to it. Partly because it produces more garbage because of language decisions. > And it doesn't need an advanced GC, so Green Tea rewrite was wasted work? One of the problems with GC is that it means forever working to come up with the "sufficiently smart GC". It was Java's original sin wrt memory, and why it did not mind producing so much garbage. But in my opinion Java has illustrated very well that there's no end to pursuit of the perfect GC. And being runtime behavior I find it a worse one-way door choice than Rust trying to find the perfect borrow checker. But no, it's not wasted work. Just like with Java improving GC and allowing programmers to produce less garbage (I shall resist making a pun here) will save many dollars of electricity, battery life, and human waiting time. > However your blog clearly points out where you stand in regards to Java, so maybe some unwillingness to learn the ecosystem was part of it. You could say that. You could also say that I won't aim to become a connoisseur of the many flavors of poop that Java is working on. The point of my is that it's clear from history and evidence that Java is poop, so finding the best tasting poop is not really interesting, nor in going in to too many details about the nutmeg aroma and polished shine a particular ball of next gen GC delivers. Life's too short to continue tasting what is already known to be poop.