Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Facebook PHP Programming

Facebook Releases JIT PHP Compiler 244

angry tapir writes, quoting a Techworld article: "In its continuing endeavor to serve its 800 million users as quickly as possible, Facebook is once again revamping the way it handles its PHP-based Web pages. Facebook has posted ... its HipHop Virtual Machine (HHVM), which the company's engineers call a just-in-time PHP compiler. According to Facebook, this PHP execution engine is 60 percent faster than its current PHP interpreter and uses 90 percent less memory." Facebook has a weblog post with a more technical description.
This discussion has been archived. No new comments can be posted.

Facebook Releases JIT PHP Compiler

Comments Filter:
  • by PCM2 ( 4486 ) on Monday December 12, 2011 @09:00PM (#38350496) Homepage

    Is FB's JIT PHP open sourced?

    It appears to be licensed under a combination of the PHP license and the Zend license. Both are BSD-like, but the Zend license has a clause that requires you to advertise for Zend if you advertise for a product built with the Zend Engine, which I don't much care for.

  • by Anonymous Coward on Monday December 12, 2011 @09:01PM (#38350498)

    If it's not, back to Xcache or APC.

    Their "10 times figure" is absolutely correct though, in both Xcache and APC, the compiled binaries to take up 10 times as much space on disk and/or in memory, but to put things in perspective, that's caching memory. It was already consuming that 10 times size when being run directly from php before.

    Memory pigs like wordpress eat like 64MB of memory before you even get to plugins. Memory deduplication is required if you are running multiple blogs because the cache files generated by things like SuperCache and MaxCDN also eat up the opcode cache space.

    Fun times.

    #1 rule of php memory management: NEVER inline html. Many people use it as a easy way to do SSI, but this eats memory, opcode cache or not.

  • by nzac ( 1822298 ) on Monday December 12, 2011 @09:01PM (#38350504)

    Its on github and depends on open-source libraries.

    from the github page:

    HipHop is licensed under the PHP and Zend licenses except as otherwise noted.

    Its opens source but not copyleft/gpl and if you want to contribute to the project i think you have to sign over the copyright (need facebook login to see the agreement).

  • Re:Mixed feelings (Score:5, Informative)

    by MightyMartian ( 840721 ) on Monday December 12, 2011 @09:58PM (#38350922) Journal

    PHP is like BASIC. In the right hands it can certainly produce just as readable and maintainable code as any other language, but the short learning curve to get to first base invites people with little or no discipline, or often enough, without any underpinnings at all, to write absolute garbage. Worse, this code often ends up being the core of some important infrastructure, and then some poor yob (I was one for several months) has the unlucky job of trying to maintain this garbage. And because the php.ini file allows you turn on all the worst aspects of the language, you end up having to do just that just to keep the damned code running while you try to clean it up.

    Oh yes, and apart from the issues I have with the language itself, it has just a plain awful library, with inconsistencies throughout that mean I spend as much time perusing the docs as I do actually coding anything.

    Between these two factors, I have to say I hate PHP, but still find myself all too often being forced to deal with it.

  • Re:Mixed feelings (Score:4, Informative)

    by dingen ( 958134 ) on Tuesday December 13, 2011 @03:29AM (#38352710)

    The language changes too rapidly

    Erm... what? Have you actually looked at the changelog [php.net] in the past few years? It's all bug fixes, there's absolutely nothing interesting going on there! Development in PHP has completely stagnated for years now. PHP 5.2 was released in 2006 (!!!) and still not everybody has caught on. Then 5.3 came out 3 years later, but it's even rarer to encounter that in the wild. The differences are totally marginal and the stuff they're deprecating is mainly bad stuff from PHP3 and PHP4 that you shouldn't have been using in anything for the last couple of years anyway.

    There's a lot wrong with PHP and there's a lot of bad stuff in there, but in my opinion the worst thing about PHP is the lack of progress to improve things. So no, I don't agree the language changes too rapidly, I think it's changing not nearly rapid enough.

Without life, Biology itself would be impossible.

Working...