in reply to Re^4: Some thoughts on Moose Attributes
in thread Some thoughts on Moose Attributes

The simple fact is, looking up the address of a method, even with catching--without yet invooking it--is no faster than a hash lookup. That's because it *is* as hash lookup.

And then you have to invoke it. And then it has to refernce the attribute through some mechanism. And then it has to return it.

So, you have 'a hash lookup' versus 'a hash lookup, plus invocation, plus whatever mechanism to obtain the attribute value, plus the return'.

It doesn't matter what happens inside the accessor to obtain the value, you've already lost by the time you looked up the address of the method. From that point on it is all down hill.


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.
  • Comment on Re^5: Some thoughts on Moose Attributes