Re: Design of the Zend Engine's Instruction Set

From: Date: Sun, 16 Aug 2009 19:18:51 +0000
Subject: Re: Design of the Zend Engine's Instruction Set
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-45287@lists.php.net to get a copy of this message
I think they are pulled out of thin air. More specifically, I think there are optimizations heaped upon optimizations heaped upon an initial implementation. It seems that each new release of PHP has a small speed improvement based on some optimization performed, but that there has been no major rearchitecture since the addition of a bytecode based interpreter in PHP 4. Well, sure, but thats usual evolution. Not a problem specific to PHP.
Was more curious about the first design.
One thing I do find interesting is that the register machine nature of PHP comes from an optimization called "compiled variables". CVs point to symbol-table entries, but without them, I'm not sure whether we would still call PHP a register machine. Any thoughts? Well, actually, I would include the temp vars also as a reason to name it a
register-memory machine model. They are accessed by using an explicit name i.e. an index into the "Ts" array. Thus, it is definitely not an implicit stack. The question would be only, is it useful to go further and interpret this structure as an infinite number of registers which would be equivalent with memory. Then it could be considered to be a memory-to-memory architecture. But usually these kind of architectures have the property of only one type of addresses, which does not hold for PHP. Best regards Stefan

« previous php.internals (#45287) next »