The demise of T[new]

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Oct 20 10:05:38 PDT 2009


Bill Baxter wrote:
> To Andrei, do you really feel comfortable trying to explain this in
> your book?  It seems like it will be difficult to explain that ~= is
> sometimes efficient for appending but not necessarily if you're
> working with a lot of arrays because it actually keeps this cache
> under the hood that may or may not remember the actual underlying
> capacity of the array you're appending to, so you should probably use
> ArrayBuilder if you can, despite the optimization.

I guess I'll try and let you all know.

Andrei



More information about the Digitalmars-d mailing list