Is HipHop really worth it?
In case you missed the news, a few months ago Facebook announced on their developer blog that they were releasing a piece of software to the wider community. That piece of software is called ‘HipHop’ and is one of the many technologies Facebook run behind the scenes to keep one of the world’s most popular sites up and running.
But what does it do? In short, HipHop translates PHP code into C++ code, which can then be compiled into native machine code. This, in theory, should remove a bottleneck or two from PHP itself - namely the interpreter - as a good deal of slow, interpreted code can be compiled into uber-fast native code. Well, in theory.
While there is a performance increase (just Google for benchmarks, there are bound to be dozens by now) I think that it simply does not justify the end for most PHP driven sites. The added complexity of ensuring all your PHP code can be understood by HipHop would be enough to drive me mad, in particular. Adding to that is the number of issues I have seen people encountering whilst trying to compile HipHop on anything other than Facebook’s own platform of choice… Not pretty.
It isn’t just that though. I believe the only real increase in performance is in processing-limited scenarios which just aren’t that common in real life. Sure, Facebook need it, but they serve hundreds of millions of pageviews each day. For Joe Bloggs’ e-commerce store the benefit of having slightly faster C++ code would quickly evaporate when it came to any code changes needing to be first done in PHP, passed through HipHop before being compiled and then debugged for a second time as C++ code.
Stability isn’t really an issue due to the above reason (it has apparently been powering Facebook for a while) and apparently HipHop supports ‘most’ PHP code, but I really do not think you should consider it for your next project. Well, unless you’re re-coding MySpace…
Recent Comments