More radical ideas about gc and reference counting

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 30 14:47:30 PDT 2014


On Wednesday, 30 April 2014 at 20:57:26 UTC, Andrei Alexandrescu 
wrote:
>> Finally, immutable is sharable accross thread. That mean, even 
>> if we
>> bypass the type system, that RC must be atomic for immutable.
>> As they
>> convert automatically for co,st, that mean that all const code 
>> will be
>> full of atomic increment/decrement. They are bad for the CPU, 
>> and cannot
>> be optimized away.
>
> Good point. I see that as a problem, albeit a solvable one.

How? Having lock; instructions implicitly appearing in normal 
looking slice code is unacceptable.


More information about the Digitalmars-d mailing list