Would you pay for GC?
pjmlp at progtools.org
Tue Jan 25 09:53:29 UTC 2022
On Tuesday, 25 January 2022 at 09:42:25 UTC, Araq wrote:
> On Tuesday, 25 January 2022 at 07:22:36 UTC, Elronnd wrote:
>> On Tuesday, 25 January 2022 at 07:13:41 UTC, Paulo Pinto wrote:
>>> ARC will also not compete, unless one goes the extra mile of
>>> making the compiler ARC aware, elide retain/release calls, do
>>> cascade deletions in background threads, take care on cascade
>>> deletions to avoid stack overflows on destructor calls,
>>> provide multicore friendly versions of them,.....
>> Indeed. See Bacon et al, 'Unified Theory of Garbage
>> Collection': increasingly sophisticated RC approaches tracing
>> (and vice versa). So it's a bit strange to assume we can do
>> one but not the other. And tracing makes a better starting
>> point due to the generational hypothesis.
> Only if you take the "deferred" RC route, which
> Swift/Rust/C++/Nim do not! Without the "deferred" aspect RC
> remains quite a different beast. Different algorithm, different
> runtime profiles, different memory consumptions, enables
> different optimizations and of course different problems.
Indeed, that was kind of my point, unless one is willing to
invest the required resources, a bit like you guys are doing with
Nim, a RC implementation will not magically outperform modern
tracing GC, only naive implementations of tracing GCs.
More information about the Digitalmars-d