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 500224
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: Database
by Alfman on Thu 15th Dec 2011 20:56 UTC in reply to "RE[2]: Database"
Alfman
Member since:
2011-01-28

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.

Reply Parent Score: 2

RE[4]: Database
by tony on Fri 16th Dec 2011 00:17 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

RE[5]: Database
by Alfman on Fri 16th Dec 2011 04:01 in reply to "RE[4]: Database"
Alfman Member since:
2011-01-28

tony,

"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.

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.

Reply Parent Score: 2