Low-latency, high-throughput garbage collection

blakepelton | 29 points

The thing I really want is a garbage collector where you can specify a timeout before it stops running. Let it stop the world, but resume the world after 10ms have passed or whatever.

Dwedit | 2 days ago

Interesting, but possibly outdated by now. E.g. they compare against a seven-year-old version of ZGC. Back then, ZGC was not only not generational, but did some scanning during a stop-the-world pause (e.g. of stacks, but not only stacks). These days, even the objects directly on the stack aren't scanned at all during a STW (a pause is only used as an efficient thread synchronization mechanism; no GC work, including the scanning of any object is done in a STW).

pron | 2 days ago

According to [1], arena allocators provide low-latency high-troughput garbage collection riding on top of "practically unlimited" virtual memory implementations of 64-bit machines.

However, it requires changes in the language level, so no wonder so few languages like Zig implement it.

[1] https://news.ycombinator.com/item?id=44403195

giovannibonetti | a day ago