I didn't read the full thread, so this might not be important.
But please take also the overhead for allocating memory into account, especially with small arrays and hashes.
It's a big difference if a container has already allocated much space and doesn't need to be expanded, like with variables from the outer scope or if it's newly created or if a list is pushed to the stack.
Not that easy like just parsing the optree. :)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^7: Using 'keys' on a list
by LanX
in thread Using 'keys' on a list
by lammey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |