Showing posts from February 3, 2010

Scaling PHP : HipHop and Quercus

While PHP is very popular, it unfortunately doesn't perform as some of its competitors . One of the ways to make things faster is to write PHP Extensions in C++. In this post we will describe two different ways developers can solve this problem and the milage you might get from either model may vary. Since Facebook is mostly running PHP, it noticed this problem pretty early, but instead of asking its developers to move from PHP to C++ one of their developers hacked up a solution to transform PHP code into C++. Yesterday, Facebook announced they are opening up HipHop , a source code transformer, which changes PHP code into a more optimized C++ code and uses g++ to compile it. With some minor sacrifices (no eval support)  they noticed they were able to get 50% performance improvement. And since they serve 400 billion page views every month, that kind of saving can free up a lot of servers. More info on HipHop PHP Hiphop: What it means HipHop: What you need