Appender is ... slow

Dicebot via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Aug 14 16:44:37 PDT 2014


On Thursday, 14 August 2014 at 21:34:04 UTC, Jonathan M Davis 
wrote:
> On Thursday, 14 August 2014 at 21:11:51 UTC, safety0ff wrote:
>> IIRC it manages the capacity information manually instead of 
>> calling the runtime which reduces appending overhead.
>
> That would make some sense, though it must be completely 
> avoiding ~= then and probably is even GC-mallocing the array 
> itself. Regardless, I clearly need to study the code if I want 
> to know what it's actually doing.
>
> - Jonathan M Davis

I wonder if using plain `Array` instead may be result in better 
performance where immutability is not needed.


More information about the Digitalmars-d-learn mailing list