Announcement

Collapse
No announcement yet.

Facebook's HipHop 2.0 Virtual Machine Is Very Fast

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Facebook's HipHop 2.0 Virtual Machine Is Very Fast

    Phoronix: Facebook's HipHop 2.0 Virtual Machine Is Very Fast

    Released last month by Facebook was their open-source HipHOp "HHVM" 2.0 virtual machine. Benchmarks of HHVM at Phoronix show that the code does live up to Facebook's performance claims...

    http://www.phoronix.com/vr.php?view=MTM0Njc

  • #2
    Most impressive

    Most impressive.
    Perhaps in a couple of years, I shouldn't be embarrased anymore for being a PHP-developer.

    Comment


    • #3
      awesome. want to try this out and see how it functions in apache / nginx with wordpress sites

      Comment


      • #4
        Before you can run HHVM you have to play Farmville on it and share with a *related friend*

        Will it run faster if I pay to 'Promote'?

        Comment


        • #5
          WOW

          This is really a great accomplishment, and I can guess more than one will be looking into installing this on their servers.

          A few things do trouble me however. It is weird that facebook doesn't even try to contribute this back to the PHP developers, surely there is much that can be merged and benefited from.

          Also why develop their own bytecode interpreter / JIT compiler when they could just use LLVM for this?

          I'm guessing that Facebook tries to remain in control of their stack, but duplication of effort on something that's open-source anyway is just puzzling.

          Comment


          • #6
            I wonder what the LIST_AVAILABLE_SUITES code is doing PHP 5.5 took only 1 second more than hiphop.

            It would be interesting to see a performance test of facebook hiphop vs php 5 + opcode cache.

            By the way there seem to be a lot of PHP haters out there but it is running about 70% of all websites on the wild so it seems to have something good

            Comment


            • #7
              Originally posted by TheOne View Post
              By the way there seem to be a lot of PHP haters out there but it is running about 70% of all websites on the wild so it seems to have something good
              It's good for websites, but a bit of a pain to set up locally.

              Comment


              • #8
                Originally posted by TheOne View Post
                By the way there seem to be a lot of PHP haters out there but it is running about 70% of all websites on the wild so it seems to have something good
                Not that I disagree with the following statement, but you do realize that by that logic Windows is also much better than the Linux-zealot haters claim, right?

                Comment


                • #9
                  Originally posted by elanthis View Post
                  Not that I disagree with the following statement, but you do realize that by that logic Windows is also much better than the Linux-zealot haters claim, right?
                  Windows is a great OS and a high quality software product, there is no
                  question about it. From the aspects of usability, support, software availability,
                  hardware drivers... linux can look up to some of the standards delivered
                  by MS products (not all, ofcourse).

                  Comment


                  • #10
                    Originally posted by elanthis View Post
                    Not that I disagree with the following statement, but you do realize that by that logic Windows is also much better than the Linux-zealot haters claim, right?
                    I get your point, but theres a huge difference between the windows analogy and PHP, in PHP case it is open source and free, but maybe people has a tendency to hate things that become popular (like the case of ubuntu), also many people that criticize PHP is due to outdated experiences with older PHP versions like 3/4 without taking a look at how the language has evolved from back then.

                    Comment


                    • #11
                      Originally posted by clavko View Post
                      Windows is a great OS and a high quality software product, there is no
                      question about it. From the aspects of usability, support, software availability,
                      hardware drivers... linux can look up to some of the standards delivered
                      by MS products (not all, ofcourse).
                      No, no, that's all wrong... The correct response is "Microsoft ate my baby and then stole my car... with my wife in the passenger seat".
                      /sarcasm

                      Windows is a good product in general, although I disagree with the direction that MS is taking with the UI for desktops in Windows 8. Their interface is nice for touch-enabled devices, but not so nice for the classic keyboard/mouse combination. Performance and stability, however, are fine. I've only managed to crash my Windows 7 desktop a couple times since Windows 7 was released, and some of those times were my own fault.

                      I use Linux for the freedom and selection that it gives me as a user and as a software developer, not because Windows is an unacceptable choice. If I ever get to the point where all of my games work in either Linux or Wine, I'll probably delete the Windows partition on my main machine, and just keep a VM around for compatibility's sake.

                      Comment


                      • #12
                        Re: wow

                        Originally posted by etenil View Post
                        This is really a great accomplishment, and I can guess more than one will be looking into installing this on their servers.

                        A few things do trouble me however. It is weird that facebook doesn't even try to contribute this back to the PHP developers, surely there is much that can be merged and benefited from.

                        Also why develop their own bytecode interpreter / JIT compiler when they could just use LLVM for this?

                        I'm guessing that Facebook tries to remain in control of their stack, but duplication of effort on something that's open-source anyway is just puzzling.
                        Hi there! I work on HipHop VM at Facebook and own a share of the credit/blame for HHVM's design and implementation.

                        On your question about open-source, back in 2007 and 2008 Facebook contributed several patches back to Zend PHP 5.2 that delivered non-trivial performance improvements (something to the tune of 5-10% CPU reduction for FB's codebase IIRC), while at the same time we also experimenting with other available PHP engines and prototyping HPHPc (the old HipHop PHP->C++ compiler which has since been retired). 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.

                        IHMO, 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.

                        On your LLVM question, we commonly get asked why we didn't use LLVM. In short, LLVM was not suitable for serving as the backend for JIT compiler when we started working on HipHop VM in 2010, and it still is lacking in this respect today. There's also advantages to owning our entire compiler stack as it gives us for flexibility to squeeze out the maximum possible performance for our PHP codebase in the long run. The Google developers who worked on Unladen Swallow (an execution engine for Python) did a nice write-up where they talked about a lot of the issues they ran into when trying to use LLVM as the backend for a JIT compiler: http://qinsb.blogspot.com/2011/03/un...ospective.html .

                        -Drew Paroski

                        Comment


                        • #13
                          Thanks Drew

                          Thanks for the work on this. With numbers like these, the community will join you.
                          Since PHP 5.4 released in Mar. 2012, my biggest concern would be in unimplemented features. Any plans to catch-up & stay with on PHP dev lock-step?

                          Comment


                          • #14
                            Originally posted by snadrus View Post
                            Thanks for the work on this. With numbers like these, the community will join you.
                            Since PHP 5.4 released in Mar. 2012, my biggest concern would be in unimplemented features. Any plans to catch-up & stay with on PHP dev lock-step?
                            Yes, one of our goals this year is to make HipHop VM support the full PHP 5.4 language, to support more extensions than we currently do, and to make it easy for developers outside of FB to port existing extensions or write new extensions.

                            At present 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.

                            Most of the missing functionality that external developers have reported is missing extensions. 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.

                            If you're interested in checking out the source code or looking at the open issues, I encourage you to check out our open source github repository: https://github.com/facebook/hiphop-php . We also blog about HipHop on our Facebook page (https://www.facebook.com/hphp) and on our WordPress blog (http://www.hiphop-php.com/wp/).

                            Comment


                            • #15
                              Originally posted by paroski View Post
                              ...
                              IHMO, 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.
                              ...
                              Is great to see that the hiphop code has a C++ base instead of plain C, the code looks more elegant and organized than that of original PHP runtime. What would be appreciated is some better documentation on how to use hiphop as a reference for the configuration file.

                              Comment

                              Working...
                              X