Feeds

Facebook 'HipHop VM' juices PHP speed pill

Aim to bust engineers out of edit-reload-debug dungeon

  • alert
  • submit to reddit

Security and trust: The backbone of doing business over the internet

Facebook hopes to shave seconds off of its PHP web pages loads and juice its servers' performance with an execution engine for the C++ code transformer it cooked up last year.

The web giant's engineers have unveiled something called HipHop Virtual Machine (hhvm) for the HipHop for PHP product already being used in software development by Facebook.

The plan is to eventually use hhvm for the execution of all PHP code on Facebook, according to hhvm project contributor Jason Evans here.

It's not clear when the change over will take place, however, as Evans reckons that the translator still needs to be stabilized and there's need for creation of an on-disk byte code format that will help reduce start-up times and store global static analysis results.

Facebook's come up with hhvm to further the work from last year on HipHop for PHP. This was conceived to speed-up Facebook page-load times and to help squeeze more compute performance from its army of 10,000 servers.

HipHop for PHP takes PHP - a flexible, dynamic language favored for the web - and converts it into C++, a statically typed language that's the world's third most popular programming language; it remains popular in part, because compiled C++ executes fast compared to interpreted languages.

The problem for Facebook was that HipHop for PHP compiled PHP statically, a fact Facebook tried to sidestep with the creation of an interpreter called hphpi.

However, Evans reckons Facebook's found hphpi takes a lot of effort to maintain.

Based on early numbers, the hhvm byte code interpreter is approximately 1.6x faster for a set of real-world Facebook-specific benchmarks than the interpreter. The translator is approximately 0.6X as fast as hphpc but not quite as fast as hphpc-compiled binaries.

"For perspective on why this matters, consider that many Facebook engineers spend their days developing PHP code in an endless edit-reload-debug cycles," Evans said.

"The difference between eight-second and five-second reloads due to switching from hphpi to the hhvm interpreter makes a big difference to productivity, and this improvement will be even more dramatic once we enable the translator."

Evans reckoned his team expects to rapidly close the performance gap between hhvm and hphpc-compiled binaries during the coming months as the dynamic translator stabilizes and matures.

"In fact, we predict that hhvm will eventually outperform statically compiled binaries in Facebook's production environment, in part because we are already sharing enough infrastructure with the static compiler that we will soon be able to leverage static analysis results during tracelet creation," he said. ®

Providing a secure and efficient Helpdesk

More from The Register

next story
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
'Windows 9' LEAK: Microsoft's playing catchup with Linux
Multiple desktops and live tiles in restored Start button star in new vids
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
Mathematica hits the Web
Wolfram embraces the cloud, promies private cloud cut of its number-cruncher
Mozilla shutters Labs, tells nobody it's been dead for five months
Staffer's blog reveals all as projects languish on GitHub
'People have forgotten just how late the first iPhone arrived ...'
Plus: 'Google's IDEALISM is an injudicious justification for inappropriate biz practices'
SUSE Linux owner Attachmate gobbled by Micro Focus for $2.3bn
Merger will lead to mainframe and COBOL powerhouse
iOS 8 Healthkit gets a bug SO Apple KILLS it. That's real healthcare!
Not fit for purpose on day of launch, says Cupertino
prev story

Whitepapers

Secure remote control for conventional and virtual desktops
Balancing user privacy and privileged access, in accordance with compliance frameworks and legislation. Evaluating any potential remote control choice.
WIN a very cool portable ZX Spectrum
Win a one-off portable Spectrum built by legendary hardware hacker Ben Heck
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
The next step in data security
With recent increased privacy concerns and computers becoming more powerful, the chance of hackers being able to crack smaller-sized RSA keys increases.