DIP80: phobos additions
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jun 9 13:53:04 PDT 2015
On 6/9/15 2:59 PM, Andrei Alexandrescu wrote:
> On 6/9/15 11:42 AM, Dennis Ritchie wrote:
>> "And finally `std.bigint` offers good (but not outstanding) performance."
>
> BigInt should use reference counting. Its current approach to allocating
> new memory for everything is a liability. Could someone file a report
> for this please. -- Andrei
Slightly OT, but this reminds me.
RefCounted is not viable when using the GC, because any references on
the heap may race against stack-based references.
Can we make RefCounted use atomicInc and atomicDec? It will hurt
performance a bit, but the current state is not good.
I spoke with Erik about this, as he was planning on using RefCounted,
but didn't know about the hairy issues with the GC.
If we get to a point where we can have a thread-local GC, we can remove
the implementation detail of using atomic operations when possible.
-Steve
More information about the Digitalmars-d
mailing list