1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Processors
  7. Software
  8. Storage
  9. Operating Systems


Facebook RSS Twitter Twitter Google Plus


Phoronix Test Suite

OpenBenchmarking.org

More Details On The HHVM Virtual Machine Design

Phoronix

Published on 12 April 2013 05:56 AM EDT
Written by Michael Larabel in Phoronix
1 Comment

After earlier this week delivering benchmarks showing Facebook's HipHop 2.0 Virtual Machine is very fast, a Facebook engineer commented in our forums about some of the design choices that were made.

Facebook's HHVM should have no problem outperforming PHP 5.5 as shown with our benchmarks. In response to the article earlier this week, there was some surprise along with questions raised. Facebook's Drew Paroski who has worked on their high-performance implementation of PHP commented to elaborate on some of their motives and positions for doing this work.

- Back in 2007~2008 they contributed patches back to Zend PHP 5.2 that yielded 5~10% reduction in CPU usage, as tested on Facebook's code-base. It was also around that time they began exploring other PHP engines and prototyping their HiHop compiler of taking PHP and converting it to C++.

- While HipHop is open-source, in terms of why they haven't tried contributing it back upstream: "After a certain point it became hard to get more gains from the Zend engine unless we substantially changed the core of the engine, and by early to mid 2009 HPHPc was getting close to being able to run Facebook's site and was looking promising."

- Paroski also added about their open-source position with HipHop, "we *are* giving back to the PHP community by open-sourcing HipHop VM, making it freely available to use, and having some engineers dedicated full-time to responding to issues reported by developers outside of Facebook. We're dedicated to maintaining a high compatibility bar with the Zend PHP engine; we want HipHop VM to be useful to developers outside of Facebook and we're slowing growing a community around it."

- If you're wondering why they used their own bytecode and virtual machine instead of the widely-used industry-leading LLVM, it simply wasn't in the state it is today back when they began work on their JIT compiler in 2010. When they began, LLVM's Just-In-Time compilation abilities weren't good enough for Facebook. Facebook engineers also found value in "owning" their entire compiler stack with greater flexibility to max out its performance for the PHP code-base.

- The HipHop developers plan to fully support the PHP 5.4 language as well as to support more PHP extensions. They also want to make it easier for outside developers to port existing and new extensions to HipHop VM.

- In terms of the current PHP 5.4 support: "we support most PHP 5.4 language features, including eval, traits, exceptions, late static binding, closures, magic methods (__get, __set, etc.), typehints, autoload, nowdocs, etc. Off the top of my head, the main features missing at present are namespaces and short array syntax, which we plan to add in the coming months. Also, there was some missing functionality with closures, but we've recently fixed that and the fixes should make it to our open-source github repo soon...HipHop currently supports a few dozen of the popular Zend extensions, but there are still several popular Zend extensions that haven't been ported to HipHop yet. While we plan to port a few more extensions this year, we're focusing primarily on making it easier to add/port extensions to HHVM. This includes cleaning up HipHop's extension system to be more friendly, having good documentation, and possibly writing some tools to help port existing Zend extensions."

For those wanting to find out more details or to checkout Facebook's source code for this high-performance PHP implementation, visit their GitHub page.

About The Author
Michael Larabel is the principal author of Phoronix.com and founded the web-site in 2004 with a focus on enriching the Linux hardware experience and being the largest web-site devoted to Linux hardware reviews, particularly for products relevant to Linux gamers and enthusiasts but also commonly reviewing servers/workstations and embedded Linux devices. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics hardware drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated testing software. He can be followed via and or contacted via .
Latest Linux Hardware Reviews
  1. Rosewill RS-MI-01: An Ultra Low-Cost Mini-ITX Chassis
  2. D-Link DCS-2330L HD Wireless Network Camera
  3. Gigabyte AM1M-S2H
  4. AMD's New Athlon/Semprons Give Old Phenom CPUs A Big Run For The Money
Latest Linux Articles
  1. AMD Catalyst 14.4 On Linux With Radeon R3 APU Graphics
  2. Red Hat Enterprise Linux 7.0 RC Benchmarks
  3. AMD Catalyst 14.4 Brings Few Linux Performance Improvements
  4. The Performance Of Fedora 20 Updated
Latest Linux News
  1. Intel Developer Proposes A New Linux CPU Load Metric
  2. R600 Gallium3D Lands Many OpenGL Fixes
  3. LLVMpipe Gallium3D Now Exposes GLSL 3.30
  4. NGINX 1.6 Brings SPDY 3.1 & Other New Features
  5. Linux Foundation Announces A Core Infrastructure Initiative
  6. More Steam Linux Tests/Benchmarks Might Be Coming
  7. NVIDIA's Amazing Single-Board ARM Computer Might Be Delayed
  8. Fedora 21 To Get A Playground, New Features
  9. PC-BSD Is Developing Its Own Desktop Environment
  10. Valve Is Bringing VOGL To Windows & Working On Regression Tests
  11. Canonical Is Taking Over Linux 3.13 Kernel Maintenance
  12. Google Web Designer Is Now Natively Available On Linux
Latest Forum Discussions
  1. Linux Kernel Developers Fed Up With Ridiculous Bugs In Systemd
  2. HTPC-upgrade advice: AMD Richland A8-7600 or Kaveri A10-6700T ???
  3. What Else Would You Like To See On Phoronix This Spring?
  4. The GNOME Foundation Is Running Short On Money
  5. The Most Amazing OpenGL Tech Demo In 64kb
  6. Announcing radeontop, a tool for viewing the GPU usage
  7. New card. Open source drivers only.
  8. Script for Fan Speed Control