Hacker News new | ask | show | jobs
by naasking 1117 days ago
Anyone worried about tracing garbage collection is worried about unpredictable costs of automatic reclamation. Even naive reference counting has unbounded pathological cases like this, like an infinite list with only one reference that dies, which triggers a cascade of infinite free ops.

You can do some gymnastics like various types of deferrals to amortise the cost, but now you're getting into more sophisticated tracing-like runtime behaviour which has it's own unpredictability.

There's no free lunch. Better static analysis that can aggregate various allocation into arenas/regions seems like the only way to make this trade-off better.