5 ms·
Facebook _doesn't_ run PHP. A large portion of it is coded in PHP, but it runs C++ through HipHop[1]. Facebook may as well be written in anything that compiles
by davidlumley 14y ago
Facebook _doesn't_ run PHP. A large portion of it is coded in PHP, but it runs C++ through HipHop[1]. Facebook may as well be written in anything that compiles down to C++.
1: http://en.wikipedia.org/wiki/HipHop_for_PHP http://en.wikipedia.org/wiki/HipHop_for_PHP
- Joeri 14y agoActually, facebook is moving to a JIT model and getting better performance out of it than the crosscompiled code. http://arstechnica.com/business/2011/12/facebook-looks-to-fix-php-performance-with-hiphop-virtual-machine/ http://arstechnica.com/business/2011/12/facebook-looks-to-fi...
- anu_gupta 14y agoBy that standard, anything may as well be written in a language that eventually results in machine code being executed.
- memla 14y agoActually, the difference between compiled C++ code, and the newest version of PHP with APC/Xcache is not that drastic, but facebook needs to squeeze out every bit of performance so they can to cut down on the number of servers. For what it's worth, PHP 5.4(without APC) performed better than both Python and Ruby on that language shootout page: http://benchmarksgame.alioth.debian.org/u64/which-programs-are-fastest.php http://benchmarksgame.alioth.debian.org/u64/which-programs-a...