dynamic array .length vs .reserve - what's the difference?

wjoe invalid at example.com
Fri Jul 31 16:32:02 UTC 2020


On Friday, 31 July 2020 at 04:28:57 UTC, Ali Çehreli wrote:
> Yes but the "sharing being terminated" phrase was my attempt at 
> explaining things, which did not catch on. :)

Real shame. I quite like it - especially if you say it out loud 
with an Austrian accent :)


> Another option, which is curiously said to be more performant 
> in memory allocation than native arrays, is std.array.Appender. 
> I've used function-local static Appenders to cut down on memory 
> allocation. Here is an uncompiled pseudo code:
>
> [...]

This looks like an even better way to do it.

Thanks, Ali :)


More information about the Digitalmars-d-learn mailing list