in reply to Re^6: Using 'keys' on a list
in thread Using 'keys' on a list
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Using 'keys' on a list
by swl (Prior) on Jul 10, 2021 at 00:25 UTC | |
by Marshall (Canon) on Jul 12, 2021 at 19:45 UTC |