in reply to Re^6: when to use lists/hash vs references?
in thread when to use lists/hash vs references?
Basically, all you've done is avoid doing the extra indirection at the Perl level.
Which is fine if you could always avoid addressing the structure contents individually, but we both know you can't.
So when you can't get away with using internal iterators exclusively, it comes back to having to perform that extra dereference. And that was the point of the benchmark: to exercise and time the cost of that extra indirection.
All your revised benchmark did was remove the very code being tested. It's like saying your program will run faster if you always make the first line of your subroutines return.
True; but utterly meaningless.
|
|---|