php logoTwo weeks ago I was reading another Drupal optimization article and then a Mozilla post on their JIT (just in time) javascript compiler for Firefox when I had a brief moment of clarity. Why the hell isn't there a PHP compiler out there? A quick Google search later I found a handful of PHP compilers. Ok...

Debating the merits of Ruby vs PHP with a friend a few weeks earlier, my friend made the point, "You're going to hit the wall a lot faster with a noncompiled language." (Note that Ruby is an interpreted language but they do have some successful JIT compiler projects). While websites like Facebook have proved that websites running PHP can be scaled, I know plenty of Drupal sites that could use a speed boost. So why aren't these compilers being used I ask? Well, the logical conclusion could be perhaps be that PHP is not necessarily the bottle neck of on most site's system. In my experience more often MySQL has actually been my bottleneck, but PHP still takes a slice of the cake. If PHP could run faster, why the hell not compile it?

Well, Hallelujah our prayers may be answered thanks to Facebook who reportedly has rewritten the PHP runtime. There is some speculation out there as to exactly what that means, but the consensus is leaning towards a legit PHP compiler.

So while my original question of why the handful of PHP compilers out there aren't being used, Facebook open sourcing a PHP compiler will generate A LOT OF MOMENTUM (in the open source community). That means whatever the other compilers are lacking, someone will now feel justified fixing it in a highly publicized and open source compiler. I feel like a little kid on Christmas eve because tomorrow they open source exactly what they've been working on. Even if it's not a compiler, whatever they unveil will no doubt be interesting.

Post new comment

The content of this field is kept private and will not be shown publicly.

Mollom CAPTCHA (play audio CAPTCHA)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated.
Powered by Drupal, an open source content management system