Sneak preview into std.allocator's porcelain

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri May 8 12:51:49 PDT 2015


On 5/8/15 12:04 PM, deadalnix wrote:
> On Thursday, 7 May 2015 at 18:25:39 UTC, Andrei Alexandrescu wrote:
>> Oh I see. That will be operational once we get the built-in allocating
>> expressions (new, array literals, delegates...) to use theAllocator.
>> Cool, thanks, -- Andrei
>
> I'm not sure how desirable this is. This require a round trip to TLS +
> virtual function call. That can be expensive, but even worse, will make
> the optimizer blind.

Yah the virtual barrier is a necessary evil. For ultimate performance 
you'd need a local allocator object fronting the built-in one. -- Andrei


More information about the Digitalmars-d mailing list