std.allocator needs your help

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Sep 24 10:07:44 PDT 2013


On 9/24/13 10:05 AM, Dicebot wrote:
> On Tuesday, 24 September 2013 at 16:58:27 UTC, Peter Alexander wrote:
>> The cost of a few cycles really doesn't matter for memory
>> allocation... If you are really allocating memory so frequently that
>> those few extra cycles matter then you are probably going to be memory
>> bound anyway.
>
> It is true if you are using malloc. Not for pool allocator or scratchpad
> allocator or similar performance-enhancing allocator.

Even for malloc it's a concern. For small allocations, jemalloc takes 
only about one hundred cycles to take you from where you are to where 
you are plus a little memory.

Andrei



More information about the Digitalmars-d mailing list