Facebook invents a PHP virtual machine

Facebook abandoned the work of translating PHP into C++ in favor of delivering dynamically generated bytecode to the server

By , IDG News Service |  Software

With the old HipHop, "the best it can do is analyze the entire Facebook codebase, reason about it and then specialize code based on its reasoning. But it can't get all of the reasoning right. There are parts of the code base that you can not simply infer about or reason about," Pobar said.

Pobar estimated that HHVM is about twice as fast as HPHPc was, and about nine times as fast as running straight PHP.

Facebook has posted the code for HHVM on GitHub, with the hopes that others will use it to speed their PHP websites as well.

HHVM is optimized for handling very large, and heavily used, PHP codebases. Pobar reckoned that using HHVM for standard sized websites, such as one hosting a Wordpress blog, would gain only about a fivefold performance improvement.

"If you take some PHP and run it in on HipHop, the CPU execution time [may] not be the limiting factor for performance. Chances are [the system is] spending too much time talking to the database or spending too time talking to [the] memcache" caching layer, Pobar said.

Joab Jackson covers enterprise software and general technology breaking news for The IDG News Service. Follow Joab on Twitter at @Joab_Jackson. Joab's e-mail address is Joab_Jackson@idg.com

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

SoftwareWhite Papers & Webcasts

Webcast On Demand

HP DevOps KnowledgeVault

Sponsor: HP

See more White Papers | Webcasts

Answers - Powered by ITworld

ITworld Answers helps you solve problems and share expertise. Ask a question or take a crack at answering the new questions below.

Ask a Question
randomness