News for hackers. Stuff that matters.
Re:Functional programming languages should be better at muta... by naasking on Wednesday July 31, 2024 @05:46AM (#41117672)
> 2. GC performance is harder to predict and reason about than certain other allocation strategies

I'm not sure what you mean by this being the least understood. It seems like it's very well understood: GC introduces latency if you want good throughput, or it reduces throughput if you want excellent latency (sub-100us is possible).

Of course, that doesn't mean you can predict what specific throughput or latency properties your specific program will have, except for GCs that have maximum bounded latency guarantees.

Re:Functional programming languages should be better at muta... by tsimionescu on Wednesday July 31, 2024 @09:00AM (#41118838)
The point is that it's very hard to predict how much of an impact the GC will have a priori. You can of course measure after the fact, and try to improve, but it's hard to architect your system in a way that you can more or less guarantee will get good GC performance (other than just not allocating any memory, of course). Malloc actually suffers from a similar problem: it's just hard to know a priori if your access patterns will work well with the internals of your allocator/GC.
Re:Functional programming languages should be better at muta... by p_l on Wednesday July 31, 2024 @09:49AM (#41119156)
IBM Metronome and similar approaches provide very strong guarantees (if you keep a certain bound on garbage creation ofc) at the expense of throughput.

What they lose is that they introduce also a certain guaranteed loss of available cpu time, due to optimizing for latency and real-time predictability.

Re:Functional programming languages should be better at muta... by andrepd on Wednesday July 31, 2024 @10:53AM (#41119735)
100us counts as excellent latency? x) that's half a million CPU cycles!
Re:Functional programming languages should be better at muta... by naasking on Wednesday July 31, 2024 @02:57PM (#41122253)
That's fast enough for real-time audio, so yes, that's excellent. And that includes compaction and only a small hit to throughput. You can get sub-2us latency at a serious hit to throughput.