Escaping the Tyranny of the GC: std.rcstring, first blood
Ola Fosheim Grostad via Digitalmars-d
digitalmars-d at puremagic.com
Thu Sep 25 19:25:06 PDT 2014
On Tuesday, 23 September 2014 at 06:19:58 UTC, deadalnix wrote:
> On Tuesday, 23 September 2014 at 03:03:49 UTC, Manu via
> Digitalmars-d wrote:
>> I still think most of those users would accept RC instead of
>> GC. Why not
>> support RC in the language, and make all of this library noise
>> redundant?
>> Library RC can't really optimise well, RC requires language
>> support to
>> elide ref fiddling.
>
> I think a library solution + intrinsic for increment/decrement
> (so they can be better optimized) would be the best option.
Yes, inc/dec intrinsic is needed to support TSX. I.e. You dont
have to inc/dec to keep the object alive within a transaction,
you only need to read something on the same cacheline as the ref
count. Essentially zero overhead in many cases afaik.
More information about the Digitalmars-d
mailing list