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. Scythe Mugen MAX
  2. Intel Core i7 5960X Haswell-E On Linux
  3. Intel 80GB 530 Series M.2 SSD On Linux
  4. With A New Motherboard, The Core i7 5960X Haswell-E Lights Up
Latest Linux Articles
  1. A Tour Of The New Phoronix Office
  2. 7-Way Linux Desktop Gaming Comparison On Ubuntu 14.10
  3. Intel P-State vs. CPUFreq Benchmarks On The i7-5960X
  4. RadeonSI GLAMOR Benchmarks With X.Org Server 1.16
Latest Linux News
  1. X.Org Server 1.16.1 Released
  2. Mesa Gets Closer To Having OpenGL 4.0 Tessellation Support
  3. Uselessd: A Stripped Down Version Of Systemd
  4. F2FS Tools Gain FSCK Support
  5. FreeBSD 10.1 Has The New VT Driver, Hardware Improvements
  6. AntiMicro 2.6 Yields Greater Compatibility For Gamepads On Linux
  7. OpenGL 3.3 / GLSL 3.30 Lands For Intel Sandy Bridge On Mesa
  8. AMD's RadeonSI Gallium3D Driver Sees Some Improvements
  9. Mesa 10.3 Released With The Latest Open-Source GPU Driver Improvements
  10. GNOME 3.13.92 Officially Released
Latest Forum Discussions
  1. Wasteland 2 Officially Launched Today, Including For Linux Gamers
  2. New stress testing utility for GPU's
  3. ASRock AM1H-ITX: One Of The Best AM1 Mini-ITX Motherboards
  4. Can Linux kill a motherboard?
  5. X.Org Women Outreach Program Only Turns Up Two Applicants So Far
  6. Stop grabbing my keyboard :(
  7. New Group Calls For Boycotting Systemd
  8. SSD seems slow