in reply to Memory efficiency with arrays
In theory, pop()ing would be more efficient than shift()ing since every so often the array will be moved down so that the gap in front of its memory space is not huge.Since Perl never does move the array down when you do shift, I don't see the purpose of this theory. You could exchange pop and shift in your theory and it would make as much sense and be as true.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Memory efficiency with arrays
by tye (Sage) on Jan 05, 2001 at 10:51 UTC |