News for hackers. Stuff that matters.
Re:Four Years of Jai by mjburgess on Friday April 18, 2025 @06:11AM (#43726586)
Not sure why you're down-voted, this is correct.

In games you have 16ms to draw billion+ triangles (etc.).

In web, you have 100ms to round-trip a request under abitarily high load (etc.)

Cases where you cannot "stop the world" at random and just "clean up garbage" are quite common in programming. And when they happen in GC'd languages, you're much worse off.

Re:Four Years of Jai by immibis on Friday April 18, 2025 @06:18AM (#43726627)
Java's ZGC claims O(1) pause time of 0.05ms.

(As with any low-pause collector, the rest of your code is uniformly slower by some percentage because it has to make sure not to step on the toes of the concurrently-running collector.)

Re:Four Years of Jai by Ygg2 on Friday April 18, 2025 @07:28AM (#43727026)
> Java's ZGC claims O(1) pause time of 0.05ms

In practice it's actually closer to 10ms for large heaps. Large being around 220 GB.

Re:Four Years of Jai by riku_iki on Friday April 18, 2025 @11:58AM (#43729288)
With Java, the issue is that each allocated object carries significant memory footprint, as result total memory consumption is much higher compared to C++: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
Re:Four Years of Jai by igouy on Saturday April 19, 2025 @11:26AM (#43737053)
The benchmarks game shows memory use with default GC settings (as a way to uncover space-time tradeoffs), mostly for tiny tiny programs that hardly use memory.

Less difference — mandelbrot, k-nucleotide, reverse-complement, regex-redux — when the task requires memory to be used.

Less with GraalVM native-image:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Re:Four Years of Jai by riku_iki on Saturday April 19, 2025 @11:34AM (#43737112)
> Less difference — mandelbrot, k-nucleotide, reverse-complement, regex-redux — when the task requires memory to be used.

yes, I referred to benchmarks with large memory consumption, where Java still uses from 2 to 10(as in binary tree task) more memory, which is large overhead.

Re:Four Years of Jai by Tomte on Friday April 18, 2025 @01:17PM (#43730012)
That's why it's good that GC algorithms that do not "stop the world" have been in production for decades now.
Re:Four Years of Jai by pebal on Friday April 18, 2025 @06:13PM (#43732292)
There are none, at least not production grade.
Re:Four Years of Jai by kelseyfrog on Friday April 18, 2025 @06:41PM (#43732497)
There are none, or you're not aware of their existence?
Re:Four Years of Jai by pebal on Friday April 18, 2025 @07:21PM (#43732755)
There are no production implementations of GC algorithms that don't stop the world at all. I know this because I have some expertise in GC algorithms.
Re:Four Years of Jai by kelseyfrog on Friday April 18, 2025 @08:24PM (#43733113)
I'm curious why you don't consider C4 to be production grade
Re:Four Years of Jai by pebal on Saturday April 19, 2025 @05:37AM (#43735299)
Azul C4 is not a pauseless GC. In the documentation it says "C4 uses a 4-stage concurrent execution mechanism that eliminates almost all stop-the-world pauses."
Re:Four Years of Jai by kelseyfrog on Saturday April 19, 2025 @03:21PM (#43738741)
Except the documentation says

> C4 differentiates itself from other generational garbage collectors by supporting simultaneous-generational con- currency: the different generations are collected using concurrent (non stop-the-world) mechanisms

Re:Four Years of Jai by pebal on Saturday April 19, 2025 @06:09PM (#43739876)
It doesn't matter at all. C4 uses STW.
Re:Four Years of Jai by kelseyfrog on Saturday April 19, 2025 @07:20PM (#43740239)
I wish I could have learned more from this interaction than it doesn't matter.
Re:Four Years of Jai by worthless-trash on Saturday April 19, 2025 @04:52AM (#43735137)
I have heard (and from when I investigated) erlangs GC is 'dont stop the world'.

Maybe my definition is bad though.