Linked by David Adams on Wed 14th Dec 2011 16:01 UTC, submitted by fran
Internet & Networking PHP's popularity and simplicity made it easy for the company's developers to quickly build new features. But PHP's (lack of) performance makes scaling Facebook's site to handle hundreds of billions of page views a month problematic, so Facebook has made big investments in making it leaner and faster. The latest product of those efforts is the HipHop VM (HHVM), a PHP virtual machine that significantly boosts performance of dynamic pages . And Facebook is sharing it with the world as open-source.
Permalink for comment 500239
To read all comments associated with this story, please click here.
RE[4]: Database
by tony on Fri 16th Dec 2011 00:17 UTC in reply to "RE[3]: Database"
tony
Member since:
2005-07-06

tony,

"Those functions in the benchmark, how often is PHP required to do computationally complex operations?"

Consider things like dynamically generated graphics (like captcha). If PHP is the wrong language for that, what is the right language? Is that language available in your hosting package?

Most PHP pages do very little at a time, like maintaining shopping carts and constructing SQL strings, but aggregately the inefficiencies do add up, especially when the level of inefficiency is great.

I'm a little surprised that I'm the only soul here who seems to care about language efficiency. Oh well, it's a sign of the times.


Image generation typically uses a linked module compiled into PHP, written in C or C++, so there's no slow down there.

Again, all the heavy lifting is done in the database. Language efficiency isn't much of an issue in those cases. For instance, you can write a PHP-based web page that creates self-signed certificate and keys. The actually SSL happens in a binary module, not in PHP itself.

If you move the heavy lifting (sorting, etc.) into the application layer, then Java would be a more appropriate language. Or some functions written into C modules attached to PHP or other language.

Reply Parent Score: 2