HHVM Beats Stable Version of PHP 7.0 In Recent Benchmark (kinsta.com) 39
campuscodi writes: PHP7 and HHVM have been exchanging punches for a while via benchmarks. While the PHP supporters were always saying, just wait until the stable version comes out, well... the stable version is out, and a recent benchmark reveals that "HHVM beats PHP7.0 hands down." Compared on: WordPress, Magento, Drupal8, Laravel, PyroCMS, and October CMS. You can still be a "PHP supporter" and favor HHVM, which "serves as an execution engine for the PHP and Hack programming languages."
Re:But, it's all still PHP (Score:4, Informative)
Re: (Score:2)
re-writing an entire application in different language will take much, much longer.
Agreed. It's especially true when you move from PHP to pretty much any other language, which typically involves a lot more lines of code. Unless you're switching to node and a large chunk of your app overlaps express features (routing, etc.).
Re: But, it's all still PHP (Score:2)
It's like watching two retarded kids compete.
CLI doesn't (Score:1)
HHVM beats PHP7 hands down, *except* when it comes to CLI interface and PHP scripting: in that scenario HHVM sucks really hard, like 300% slower than PHP7.
HHVM beats PHP7 only in some given scenario, and that's not without glitches (it still can't play properly with upload_max_size and some ini_get... https://github.com/facebook/hhvm/issues/4993 ).
Re: (Score:2)
It's good to have options (Score:2)
Not relevant (Score:5, Insightful)
I don't care about these results, for the simple fact that nothing guarantees that Facebook won't make any changes to HHVM in the future that is beneficial for Facebook, but adverse for all other PHP based webapplications. PHP 5 is fast enough for me. PHP 7 being significantly faster is more than good enough.
Re: (Score:3)
You mean other than the fact that they probably couldn't do that even if they set out to do so intentionally and hired a team of Engineers to spend years trying to do it. I'm curious, just exactly how you think this is even possible? HHVM either supports PHP or it doesn't (turns out it does) and I cannot imagine a chan
Re: Not relevant (Score:1)
Because Microsoft didn't build an empire doing exactly that.... Embrace, extend, extinguish anybody.
Re: (Score:2)
WTF? Why makes you think they have some sort of obligation to be PHP compatible, and not make their own, slightly-incompatible version of PHP? That's exactly what Microsoft did with J++ after all. If it suits them to make their own version of PHP, there's nothing to stop them.
Re: (Score:2)
Re: (Score:2)
Re: (Score:1)
Re:Not relevant (Score:4, Insightful)
They are the only organization to create a PHP specification in over 20 years of PHP's history.
If anything, I would say they're far more committed to PHP than Zend ever was or PHP's new overlords, Rogue Wave.
PHP 7 is faster than HHVM (Score:5, Interesting)
In our company we have developed HTTP/REST based microservice architecture framework written in PHP, and our performance tests show that PHP 7 is much faster than HHVM:
PHP 5.6.13 - performance about 400 requests/second
HHVM 3.10 - performance about 600 requests/second
PHP 7.0.0 - performance about 750 requests/second
In addition with PHP 7 we avoid many compatibility issues with 3rd party extensions not or badly supported on HHVM. Consequently HHVM is going to be obsolete after PHP 7 stabilises a bit.
(I have also deployed PHP 7 on some Magento eshops and the performance gain is terrific compared to PHP 5.6.)
Re: (Score:1)
Re: (Score:2)
Optimizing: have you tried using hhbc/repo-auth-mode? This can gets you tens of percents, though isn't compatible with all code. Additionally, are you excluding JIT warm-up time?
Standard disclaimer: we are not faster at everyone's code. In particular, PHP tends to be faster if you have a load of code just in files, but not in functions/methods.
Re: (Score:1)
JIT warm-up was is taken into account, i.e. test results were discarded until HHVM performance peaked.
Benchmarked PHP scripts are daemons, thus repository authoritative mode would not affect the performance, except of the first request.
The code is object-oriented, consisting of many layers, each split into small testable methods. The benchmarked scripts were basically reading and writing socket streams, transforming data between JSON and MsgPack and reporting its status into Redis database.
Resource usage? (Score:2)
I am more interested in resource usage than performance, since I use PHP to provide a GUI for embedded devices.
Anybody knows of a good benchmark between PHP 5, PHP 6, PHP 7 and HHVM in this area?
Facebook (Score:3)
Re: (Score:2)
Hacking wordpress is even faster! (Score:2)
Oh good! Now Wordpress can be compromised even faster than before!
Relative performance also interesting (Score:3)
I assume Laravel is using static content here hence it's performance, but I'm intrigued at Drupal's performance compared with October and WordPress. Is this because Drupal's sample site is simpler and had less to do, or because Drupal is better optimised/cached?
Re: (Score:2)
Comment removed (Score:3)
Re: (Score:1)
I get your dislike of how many here hate PHP, but I think "Hack programming languages" is referring to this:
"Hack is a programming language for HHVM. Hack reconciles the fast development cycle of a dynamically typed language with the discipline provided by static typing, while adding many features commonly found in other modern programming languages."
http://hacklang.org/
Re: (Score:2)
Yeah, but how well did his C code work?
It's entirely possible to make very high-performing and reliable code that looks like total shit like that, and I can certainly see a long-time highly-competent assembly programmer doing just that in the days before modern programming languages and styles. Go look at all those old arcade and NES games; the binaries are absolutely tiny, and I can only imagine what the code looks like (probably all assembly), but you never saw those things "crash".
The problem, of course
Re: (Score:2)
Yes, I think I addressed that when I pointed out at the end how such code is unmaintainable, because only the original author has any clue how it works. It's also good to make maintainable code because even the original author will forget about it and have trouble working with it after some time. I'd say maintainability is one of the main reasons we have high-level languages (that plus being able to write applications with fewer programmer-hours): back in the old days, it only took one programmer to write
Re: (Score:2)
Re: (Score:2)
HHVM loses in usabilty. Big time. (Score:2)
HHVM is an improvement for FB, because they have a small army maintaining their Pipeline and save 40% of their Servers using Hack and HHVM. For regulÃr Php szenarious hhvm is utterly pointless. I'll trust the zend engine for all that stuff, thank you.