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.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy
  • Comment on Re^7: when to use lists/hash vs references?