Never content with good enough when it comes to speed, Facebook has taken its open-source, PHP-boosting HipHop technology to the next level for programmers. With the new HipHop Virtual Machine, Facebook claims it has improved upon HipHop interpreter performance by 60 percent, meaning PHP developers can be even more productive. Looking forward, HipHop VM will help improve PHP performance on the Facebook website.
In its original form, HipHop converted PHP to AST to C++ to x64. Not only has it boosted performance for Facebook, but also for a variety of other PHP-based sites, including Drupal, MediaWiki and WordPress. But Facebook wanted to make HipHop even better, so it undertook the HipHop VM effort.
In a blog post introducing HipHop Virtual Machine, Facebook software engineer Jason Evans describes it as an experiment in just-in-time translation of PHP to native machine code with the ultimate goal of further boosting performance over the original HipHop incarnation. The execution engine consists of a new interpreter that turns standard PHP into HipHop bytecode, and a dynamic translator that turns the HipHop bytecode into x64. The dynamic translator aims to replace Facebook’s existing HipHop compiler, which Evans says is somewhat problematic because it’s a static compiler while PHP is a dynamic language.