Re: Method call improvements
| From: | Stanislav Malyshev | Date: | Tue, 12 May 2009 01:01:19 +0000 |
| Subject: | Re: Method call improvements | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-43887@lists.php.net to get a copy of this message | ||
Hi!
FWIW, since PHP has a static inheritence chain, the best approach seems to be to build a virtual dispatch table, instead of a hashtable for functions. However, there might be some esoteric extensions which make this difficult.IHMO it's not static enough. I.e., since PHP is not compiled, we can not create VD table for the class until runtime inheritance, which means that the code using this class can use method resolution more efficient than name->function, i.e. hashtable. These lookups can be cached (i.e. CV style) but I don't see how they can be altogether prevented. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com