Re:Functional programming languages should be better at muta...
by devit on Wednesday July 31, 2024 @07:54AM
(#41118378)
> But the method itself has still got a much slower throughput than a tracing GC, when used in a similar manner
That is correct, but the issue is not with reference counting, but rather with having unnecessary extremely frequent RC/GC operations.
Once frequency is reduced to only necessary operations (which could be none at all for many programs), reference counting wins since its cost is proportional to the number of operations, while GC has fixed but large costs.
Re:Functional programming languages should be better at muta...
by eru on Thursday August 01, 2024 @12:15AM
(#41126102)
You can very well have a Rust-like language with Rust's model of 'compile-time memory management', but you replace all uses of reference counting with tracing garbage collection.
That is correct, but the issue is not with reference counting, but rather with having unnecessary extremely frequent RC/GC operations.
Once frequency is reduced to only necessary operations (which could be none at all for many programs), reference counting wins since its cost is proportional to the number of operations, while GC has fixed but large costs.