Become a fan of Slashdot on Facebook

 



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 @07:46PM (#38350378) Homepage

    I'd like to launch this discussion by making a snide remark about PHP.

  • Yo Dawgs! (Score:4, Funny)

    by syousef ( 465911 ) on Monday December 12, 2011 @07:48PM (#38350398) Journal

    Da Hip Hop PHP compila is in Da House! Respect bitches!

  • Interesting that they've settled on this approach, which in some ways is much more traditional: developing a high-performance JIT for a dynamic language instead of trying to statically compile a subset. Basically the approach taken by StrongTalk, V8, PyPy, Rubinius, etc.

  • by jmichaelg ( 148257 ) on Monday December 12, 2011 @07:51PM (#38350426) Journal
    From the article....

    The first 90% of the hhvm project is done; now we're on to the second 90% as we make it really shine.

  • by Maltheus ( 248271 ) on Monday December 12, 2011 @08:12PM (#38350594)

    They're just not maintainable in my experience.

  • by thestudio_bob ( 894258 ) on Monday December 12, 2011 @08:27PM (#38350692)
    Can I "Like" this?
  • by kervin ( 64171 ) on Monday December 12, 2011 @09:00PM (#38350942)

    You can find a real PHP compiler at http://phpcompiler.org/ [phpcompiler.org]. It would be nice if the official PHP engine had built in support for loading and running bytecode ( like JVMs ) instead of strictly text code.

    • by Guspaz ( 556486 ) on Monday December 12, 2011 @09:38PM (#38351208)

      Or Phalanger at http://www.php-compiler.net/ [php-compiler.net] which is a GPL project that compiles to CIL bytecode, which is then run through .NET or Mono in a JIT fashion. It's a proper .NET language, so you get access to the .NET framework as well as the core PHP functions and default extensions. Unfortunately, some of the non-default extensions that they've ported (like gd2 or memcached) are not available in the GPL version.

      • by cshark ( 673578 ) on Monday December 12, 2011 @11:12PM (#38351826) Homepage
        Yes, but it's non standard. With Phlanger, you're mixing old extensions with known threading and security bugs with a weird namespace format, and an incomplete implementation. Then there's Studio integration, which is spotty. Didn't even support Studio 10 last I checked. If by "real" you mean, "runs half ass on .net" you're right. In terms of maturity, and in most other respects, it can't touch hiphop. Seriously man, try hiphop. It's amazing.
  • by viperidaenz ( 2515578 ) on Monday December 12, 2011 @09:19PM (#38351068)
    the readme says its a source code transformer that converts php into c++ then compiles it with g++.
    How is that a JIT VM in any sense of the word?
    • by PCM2 ( 4486 ) on Monday December 12, 2011 @09:51PM (#38351280) Homepage

      I think the Readme on GitHub is a placeholder. They took the Readme from HipHop, aka hphpc, which was the earlier project. This is HipHop VM, which is something different. Read the "more technical description," linked at the top, to get the picture. Basically, HipHop goes PHP-->Abstract Syntax Tree-->C++-->x64. HipHop VM goes PHP-->AST-->Bytecode, then runs the bytecode through a JIT.

  • dev only (Score:4, Insightful)

    by Fnord666 ( 889225 ) on Monday December 12, 2011 @09:27PM (#38351140) Journal
    Unless I misunderstood the post, this is only being used in their development environments. It sounds like they are still using statically compiled php for production. They did mention that they hoped to closed they gap in performance between the two in the near future though.

Would you people stop playing these stupid games?!?!?!!!!

Working...