Array new: 1000000 performance question
Colin Putney
cputney at wiresong.ca
Tue Jul 20 22:59:40 UTC 2004
On Jul 20, 2004, at 1:29 PM, John M McIntosh wrote:
> You'll note if you allocate a new object then drop it into the Array
> then it will cause the million array object to become a root object
> since
> it points to an element in newspace. This causes us to iterate over
> the million elements again and CPU time will go way up.
>
> Solving this issue is an exercise for the reader.
I propose the following solution: don't use million-element Arrays.
Cheers,
Colin
More information about the Squeak-dev
mailing list
|