Over on PHPEverywhere this morning, there's a link to Sterling Hughes' weblog and some benchmark results of the code enhancements that they made to the Zend core engine.
Sterling and Thies rewrite large parts of the core engine of PHP, resulting in amazing speedups -- Now i am not an expert on PHP internals, and there are probably several optimizations that i missed, but one obvious one i think i can understand is this. PHP is parsed and compiled into low-level opcodes. The following code taken from zend_execute.c (before the improvements) is the interpreter that executes the opcodes, and is a giant switch statement in a while-loop. [...] This sort of algorithm is very popular when you code in assembler, and is proof that C is actually a macro assembler - you couldn't do this in Java. I have a vague recollection that some Lisp and Forth intepreters were implemented like this. Perhaps someone can eludicate on this.
PHP 4.4 anyone?
As if PHP weren't fast enough already...there's also a detailed writeup that you can check out for more data.




