Fast temporary dynamic arrays? (And slicing of them)

Tom Kazimiers 2voodoo at gmx.de
Tue Sep 7 08:49:40 PDT 2010


Hi,

thanks for your tests.

On 09/06/2010 04:59 AM, bearophile wrote:
> My first test shows that it may work. But I have to grow the array
> backwards, and push back the array start, because that's how my stack
> grows (using alloca to allocate geometrically bigger chunks). So
> unless you want to reverse the items once the array is built, you
> have to change the algorithm that uses the array a little.

Unfortunately I need the elements to stay in the order I have added
them. But good to know that it would work with backward growing of the
array - do have you an example of that?

Cheers,
Tom


More information about the Digitalmars-d-learn mailing list