Hot on HuffPost Tech:

See More Stories
Engadget for the iPhone: download the app now
AOL Tech

PHP too slow for Facebook, builds its own faster version

It seems the world's largest user of PHP -- itself the Internet's most popular programming language -- has decided to build and compile its own version to speed up its operation. Facebook, which has over 350 million users, is due to announce its changes this week, but speculative rumors are bouncing all over the place!

The SD Times suggests that a new in-house runtime was built -- the bit of software that executes the PHP code -- but the commenters suggest otherwise: they just think it's a 'pre-compiler' type tool. Basically, PHP is compiled at execute time -- when you visit a page on Facebook, the code they've written is compiled there and then. In contrast, most software that you run on your computer will be pre-compiled. The time it takes to compile the PHP code isn't negligible, especially when dealing with billions of requests per day -- even a 1% increase in execution speed would be massive.

I was simply amazed that Facebook has been running interpreted PHP all this time -- it's definitely not the fastest (or prettiest) language in the west. We'll have to wait until Tuesday to find out exactly what they've done, but I have a feeling Facebook might finally cease to be the slowest website on the Internet.

And yes, if you were wondering, Facebook is going to honor PHP's open source license and contribute their new code to the repository!
Share StumbleUpon.com

Tags: bytecode, compiled, facebook, interpreted, php, programming, runtime, scripting

Comments

15