Rasmus Lerdorf wrote:
This comes up once or twice a year. The machine code you compile to is
going to end up looking a lot like the current executor since you don't
have strong types to help you optimize anything. You'd still need to
pass the unions around and do runtime type juggling and all the overhead
that comes along with that.
Strict typing is not required for JIT-level optimization. See:
Smalltalk, Self, Strongtalk, Tamarin. The Strongtalk guys, who have a
stricter-than-usual typed Smalltalk implementation, and a pretty good
JIT, actually ignore the type information during JIT analysis.
The idea behind PHP from day one was that it was an environment for
wrapping compiled code. Things that are performance critical is written
in C/C++ and things that aren't are left in the PHP templates. Whether
you issue an SQL query from PHP or from a compiled C program doesn't
affect the overall performance of the system so you might as well do
that from PHP.
And since day one, people have been building big ole PHP libraries ... :-)
For someone seriously interested in looking into this, there are some
'free' JITs available from the following projects: Apache Harmony (an
Apache licensed J2SE implementation), StrongTalk (Smalltalk), Adobe
Tamarin (recently donated to Mozilla), and Sun's HotSpot (Java;
curiously, HotSpot was based on StrongTalk!).
--
[EMAIL PROTECTED]
IBM PHP Community Architect, IBM Research Triangle Park
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php