Facebook Technology Tasting – HipHop for PHP

| posted in: Facebook Development | 1


What is HipHop

HipHop for PHP transforms PHP source code into highly optimized C++. It was developed by Facebook and was released as open source in early 2010.
HipHop transforms your PHP source code into highly optimized C++ and then compiles it with g++ to build binary files. You keep coding in simpler PHP, then HipHop executes your source code in a semantically equivalent manner and sacrifices some rarely used features – such as eval() – in exchange for improved performance.
Facebook sees about a 50% reduction in CPU usage when serving equal amounts of Web traffic when compared to Apache and PHP. Facebook’s API tier can serve twice the traffic using 30% less CPU.

Why HipHop

One of the explicit design goals leading into HipHop was the ability to continue writing complex logic directly within PHP. Companies with large PHP codebases will generally rewrite their complex functionality directly as PHP extensions in either C or C++. Doing so ends up reducing the number of people who are able to work on the company’s entire codebase. By keeping this logic in PHP, Facebook is able to move fast and maintain a high number of engineers who are able to work across the entire codebase.

Know more about HipHop click here

Reference :  http://developers.facebook.com/blog/post/358/

Previous Post

One Response

  1. If it were a war, and 1/3 of troops got killed in battle, then that’s a very big number. And I have nothing against them, I’m planning to get one myself. I’m saying many people regret getting them which they do, but you’re all like “HURRR DURRR TATTOOS R COOL AND GD Y U PREACH H8″. You call me biased, yet I have nothing wrong with them, nor have I said that. So yes, in fact you ARE ignorant for thinking that I’m &#ai20;b28sed” against something which I myself want to get involved in.

Leave a Reply