On Sep 22, 2010, at 05:46, Oleg Krupnov wrote:
> It seems that the -addObjectsFromArray: method may be what I
> need, but the docs do not make it clear if it's internally optimized
> to do only a single memory re-allocation.
I'll add my two cents: you should almost always use the method that dire
On Sep 22, 2010, at 05:46, Oleg Krupnov wrote:
> I have a NSMutableArray and need to add a number of elements to it,
> and their quantity I know in advance (in fact, they come from another
> array).
>
> I think that if I add them one-by-one in a loop, the array will have
> to reallocate its inter
On Sep 22, 2010, at 2:46 PM, Oleg Krupnov wrote:
> I think that if I add them one-by-one in a loop, the array will have
> to reallocate its internal memory frequently. This seems inefficient.
"I think" and "seems" are bad advice. What do Shark/Instruments say? Does it
take long? Does this code r
Le 22 sept. 2010 à 14:46, Oleg Krupnov a écrit :
> Hi,
>
> I have a NSMutableArray and need to add a number of elements to it,
> and their quantity I know in advance (in fact, they come from another
> array).
>
> I think that if I add them one-by-one in a loop, the array will have
> to realloca
Hi,
I have a NSMutableArray and need to add a number of elements to it,
and their quantity I know in advance (in fact, they come from another
array).
I think that if I add them one-by-one in a loop, the array will have
to reallocate its internal memory frequently. This seems inefficient.
I'd lik