1. 云栖社区>
  2. PHP教程>
  3. 正文

PHP 7.0 vs. HHVM 3.10 Performance Tests

作者:用户 来源:互联网 时间:2017-12-01 12:57:48

PHP 7.0 vs. HHVM 3.10 Performance Tests - 摘要: 本文讲的是PHP 7.0 vs. HHVM 3.10 Performance Tests, With PHP 7.0 RC7 being the final development versionofPHP 7, which is expected to be officially release at the end o

With PHP 7.0 RC7 being the final development versionofPHP 7, which is expected to be officially release at the end of the month, I've carried out some fresh benchmarks of PHP using our in-house benchmarking software. Compared in this latest PHP 7 benchmarking comparison is PHP 5.5 as packaged on Ubuntu 14.04 LTS and then comparing fresh builds of PHP 5.6.15 and PHP 7.0.0 RC7. On the HHVM side was using Facebook's HHVM 3.10.1release as packaged for Ubuntu 14.04 LTS.

These PHP and HHVM benchmarks were done on two distinctly different systems: an Intel Ivy Bridge laptop and an Intel Xeon Haswell-E workstation. Both systems were running Ubuntu 14.04 LTS 64-bit.

The benchmark being run is the Phoronix Test Suiteown built-in self-test of its PHP hot code paths. The work mostly comes down to a lot of file read/writes, basic math, PHP DOM interactions when it comes to generating XML SVG graphs, etc. Those wishing to reproduce the testing can grab Phoronix-Test-Suite from GitHuband run phoronix-test-suite debug-self-testto run it straight-forward or once installed running phoronix-test-suite benchmark pts-self-testwill wrap it in a self-hosting manner to generate the result graphs, etc. The same Phoronix Test Suite 6.0-Hammerfest near-final revision was used for testing. When building PHP from source for this testing, it was configured with just --enable-xmland --enable-zipas the only extra requirements for getting the Phoronix Test Suite running from the command line.

First up are the results from the ASUS Ivy Bridge ultrabook:

Interestingly, PHP 7.0.0 RC7 is running past HHVM 3.10.1 by a noticeable margin! Again, this is just with the Phoronix Test Suite test case, which is an interesting take compared to say running a WordPress benchmark where the HHVM/PHP developers have already tuned for it, etc. The Phoronix Test Suite also just depends upon PHP CLI without a web server or other caching mechanisms. Besides managing to beat out HHVM 3.10, PHP 7.0 was the better part of three times faster than PHP 5.5/5.6.

With the render-test sub-set that just comes down to a lot of XML processing and then generating SVG graphs from that data, PHP 7.0 RC7 was almost twice as fast as HHVM 3.10.1.

Where HHVM 3.10.1 did win though was when it came to peak memory use. PHP 7.0 RC7 didn't improve much over PHP 5.5/5.6 at least in this test when it came to memory usage while HHVM 3.10 peaked at only 140MB rather than 180MB.

On the next page are the results from the 20-thread Intel Xeon E5 v3 Haswell system.

以上是云栖社区小编为您精心准备的的内容,在云栖社区的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索,以便于您获取更多的相关知识。