Fwd: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / README.ZEND_VM

php.internals

Andi Gutmans

21 years ago
FYI, some more information about the proposed changes. It's really not critical, because I think performance is much more dependant on how the application is written, the database queries and so on, but it's quite a nice system which gives us both opcode specialization and other execution alternatives. I heard some are worried about not being able to hook into opcodes anymore. I don't think that's really required (it wasn't in PHP 4) but if you feel strongly about it, we could maybe always create the handler execution architecture and allow you tell PHP (in your extensions like xdebug) to use that method. It's a bit bloated and again, I don't think it's needed but it could probably be done. (FYI: Probably the same people complained when I made the change from PHP 4 to PHP 5 from switch() to handler which was purely an architectural reason) :) Just an interesting observation :) Andi

John Coggeshall

21 years ago
Personally I would like to see the hooks for op-codes stay in place, I think they offer a lot of possibilities for extensions. Andi, what do you mean "create the handler execution architecture"? I'm a little confused to what you are referring to. John PS -- I hated the switch() method ;) On Thu, 2004-09-09 at 13:17, Andi Gutmans wrote:

Andi Gutmans

21 years ago
At 02:04 PM 9/9/2004 -0400, John Coggeshall wrote:
>Personally I would like to see the hooks for op-codes stay in place, I >think they offer a lot of possibilities for extensions. Andi, what do >you mean "create the handler execution architecture"? I'm a little >confused to what you are referring to.
I mean that what we have to day is the function handler dispatch architecture (i.e. what it is in PHP 5.0.x). In PHP 4, we had switch(). Again, I think the opcode hook could be solved for people who want to do so by having such a version floating around in the address space for extensions that want to use it. It's a bit more memory but it's memory that should be shared.
>PS -- I hated the switch() method ;)
It was definitely uglier and that's why I made the change but in many cases the "goto and/or switch" dispatch methods are faster. Andi