in reply to Re^4: Some thoughts on Moose Attributes
in thread Some thoughts on Moose Attributes
It ain't never gonna happen.
I agree it's unlikely.
I bet you cannot return a previously set value, to perl via method call, quicker than it can be retrived from a hash.
Who said anything about a method call? What I have in mind is something as fast as a lexical lookup, which as an indexed lookup (and, of course, modulo pad depth and optimization) is (often) quicker than a hash lookup.
With that said, optimizing method lookups where possible is also useful, and perhaps necessary in this case. I believe this is most feasible with a system of gradual optimizations. It's also highly unlikely with the Perl 5 source code as it is now.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Some thoughts on Moose Attributes
by BrowserUk (Patriarch) on May 02, 2011 at 03:29 UTC | |
by chromatic (Archbishop) on May 02, 2011 at 03:35 UTC | |
by BrowserUk (Patriarch) on May 02, 2011 at 13:03 UTC | |
by chromatic (Archbishop) on May 02, 2011 at 18:03 UTC |