One way to cut down on array size is to pre-size for the number of elements you expect all in one chunk. I think I recall this was done like so:
All of this is discussed in the back of the Camel in the section on optimizing memory.$#foo = 100; # expecting 100 elements
In reply to Re: List overhead
by perrin
in thread List overhead
by malloc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |