• Facebook Speeds Development With “HipHop Virtual Machine”, A 60% Faster PHP Executor

    Friday, December 9th, 2011

    Josh Constine is a technology journalist who specializes in deep analysis of social products. He is currently a writer for TechCrunch. Previously, Constine was the Lead Writer of Inside Facebook, where he covered Facebook product changes, privacy, the Ads API, Page management, ecommerce, virtual currency, and music technology. Prior to writing for Inside Facebook, Constine graduated from Stanford University... → Learn More

    HipHop Virtual Machine
    HipHop Virtual Machine

    “Consider that many Facebook engineers spend their days developing PHP code in an endless edit-reload-debug cycle. The difference between 8-second and 5-second reloads due to switching from HipHop interpreter to the HipHop Virtual Machine makes a big difference to productivity.” That’s how Facebook explains the significance of its new PHP executor, HipHop Virtual Machine, announced today. It’s 60 percent faster than the HipHop interpreter Facebook currently uses. HHVM will improve the performance of Facebook’s code and speed up the development process without forcing Facebook to switch off of PHP, which its engineers are trained in.

    Facebook originally deployed its open source HipHop for PHP in February 2010 to convert PHP into C++. This allows it to save CPU cycles on its web servers. However, it made it difficult to optimize code and required a HipHop interpreteter that took “a lot of effort to maintain”.

    So over the last year it developed HHVM to replace that interpreter. Now, ”as compared to HipHop interpreter, the HHVM bytecode interpreter is approximately 1.6X faster for a set of real-world Facebook-specific benchmarks.” However, we’ve received reports that Facebook’s old HipHop interpreter was relatively slow to begin with, compared to a native PHP interpreter.

    For more technical details, check out the in-depth blog post about HipHop Virtual Machine. Eventually, Facebook may run all its PHP through HHVM. First, it is working the kinks out of the HipHop translator. As HHVM is deeply integrated into the source code of HipHop, which is available on GitHub, Facebook hopes “that the PHP community will find hhvm useful as it matures and engage with us to broaden its usefulness through technical discussions, bug reports, and code contributions.”

    Update: Due to an error on the part of The OutCast Agency, Facebook’s PR agency, this article originally stated incorrectly that HHVM provided a ”90 percent reduction in memory cost” over Facebook’s existing HipHop interpreter. The agency sent us this incorrect information based on an early unpublished draft of Facebook’s post on HHVM that was later corrected by Facebook’s engineers.


    Company: Facebook
    Website: facebook.com
    Launch Date: February 1, 2004
    IPO: NASDAQ:FB

    Facebook is the world’s largest social network, with over 845 million monthly active users. Facebook was founded by Mark Zuckerberg in February 2004, initially as an exclusive network for Harvard students. It was a huge hit: in 2 weeks, half of the schools in the Boston area began demanding a Facebook network. Zuckerberg immediately recruited his friends Dustin Moskovitz, Chris Hughes, and Eduardo Saverin to help build Facebook, and within four months, Facebook added 30 more college networks. The original...

    Learn more

    Sponsored Ads

    Sponsored Ads

    Sponsored Ads

    Upcoming Events

    E3 2012

    Los Angeles, CA

    Disrupt SF 2012

    San Francisco, CA