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.
Thread beginning with comment 500252
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[6]: Database
by tony on Fri 16th Dec 2011 05:15 UTC in reply to "RE[5]: Database"
Member since:


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

Correct me if I'm wrong, but this is what I'm hearing:

A) C/C++ should be used for CPU intensive tasks because PHP performs poorly on intensive tasks.

B) There's no reason to make PHP efficient because CPU intensive tasks can be done in more efficient languages.

The reasoning is too circular for my taste.

I think you're looking a little too hard for some circular reasoning. A far more reasonable (and obvious) takeaway might be:

1: C/C++ is used in PHP where it makes sense to have something fast.

2: There's no reason to do everything in C/C++, because much of what PHP does is fairly basic. For the CPU-intensive operations, use compiled code, somewhat the same way hardware uses ASICs and GPUs for specific operations (such as crypto).

The other issue I already alluded to is that not everyone has access to a web server where they can load their own apache/PHP modules because they're running in a shared environment where everyone has to make due with the same stock settings.

That's true, but by the time you get to where that becomes important, you've got a hosting plan that includes more than a stock environment (VPS, Amazon, etc.)

Reply Parent Score: 2