Often repeated array allocations
Namespace
rswhite4 at googlemail.com
Sun Jul 21 14:35:14 PDT 2013
On Sunday, 21 July 2013 at 21:31:08 UTC, bearophile wrote:
> Namespace:
>
>> I have a float[1024] buffer which is used, as long as the
>> requested size is less than 1024. If it's greater, I will
>> temporary allocate the whole array with new float[Size];
>
> That's one of the ways I solve similar problems.
>
>
>> Any improvements? Or is 1024 to small / big?
>
> An idea is to add some debug{} code that computes statistics
> for the array sizes...
>
> Bye,
> bearophile
Too much effort. But if some of you have this experiences
already, I would gladly profit from them. ;)
More information about the Digitalmars-d-learn
mailing list