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. Intel Xeon E5-1680 v3 & E5-2687W v3 Compared To The Core i7 5960X On Linux
  2. Intel 120GB 530 Series SSD Linux Performance
  3. Btrfs/EXT4/XFS/F2FS RAID 0/1/5/6/10 Linux Benchmarks On Four SSDs
  4. AMD's Windows Catalyst Driver Remains Largely Faster Than Linux Drivers
Latest Linux Articles
  1. Mesa 10.5-devel Brings Some Intel Haswell HD Graphics Changes Over Mesa 10.3
  2. NVIDIA vs. Nouveau Drivers With Linux 3.18 + Mesa 10.4-devel
  3. Is The Open-Source NVIDIA Driver Fast Enough For Steam On Linux Gaming?
  4. Linux 3.18 File-System Performance Minimally Changed But Possible Regressions
Latest Linux News
  1. Amazon's Fire TV Stick: A Nice, Affordable Media Center Option
  2. Google Puts Chrome NPAPI Support On Final Countdown
  3. There's New In-Fighting Over The Future Of Compiz
  4. GTK+ Inspector Gains More Features Ahead Of GNOME 3.16
  5. Clang 3.6 Will Hopefully Have OpenMP Support
  6. A Go Front-End Could Soon Be Landing In LLVM
  7. Linux 3.18-rc6 Released, A Worrisome Regression Remains
  8. HandBrake 0.10 Brings H.265 & VP8 Encoders
  9. Gngr: A New Web Browser Focused On Privacy
  10. Linux 3.18 Kernel: Not Much Change With Intel Haswell Performance
Latest Forum Discussions
  1. Roadmap to Catalyst 14.10 ?
  2. how to configure module phoromatic ?
  3. PulseAudio 6.0 Is Coming & Other Linux Audio Plans For The Future
  4. Debian Developer Resigns From The Systemd Maintainership Team
  5. Updated and Optimized Ubuntu Free Graphics Drivers
  6. Cant get working Kaveri APU - A10-7850k
  7. Script for Fan Speed Control
  8. Debian Init System Coupling Vote Results