Re: Method call improvements
| From: | Stanislav Malyshev | Date: | Mon, 19 Jan 2009 17:11:03 +0000 |
| Subject: | Re: Method call improvements | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-42709@lists.php.net to get a copy of this message | ||
Hi!
Nope. But sometimes we are in a scope where it is always the same thing we call. Or at leats a one of the three things are constant. And any of them being constant would help.Well, object can't be constant, so only thing constant can be method name. We have it in opcode. Everything else depends on object, and since we don't know the object in compile time we couldn't put more in opcode. We could cache some things in runtime - though not inside opcodes.
Now handler table is per-object.having only one handler table per class would make objects less flexible.How so? Tell me any case where that is different right now?
Right now every member of a class tree (each class derived from a specific base class) has the same handler table. And that cannot be changed becasue each of the class members have the same creation/destruction c functions.These C functions can have if()s which may produce different kinds of objects. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com