How fast can PHP 8 be? (Performance Testing)

Guanhui
Release: 2023-02-17 11:22:01
forward
8736 people have browsed it

How fast can PHP 8 be? (Performance Testing)

Phoronix has released a performance benchmark report for PHP 8. Since PHP 8 Alpha1 won't be released until roughly mid-June, Phoronix built a version for testing from the latest PHP 8 Git code (as of the end of May). In addition to the newJIT compiler, important new features of PHP 8 also include new static return types, union types 2.0 (union types) andattributes (attributes), etc.

For more features, please refer to "New Features and Major Adjustments in PHP 8"

The versions used for reference comparison include: PHP 7.4. 6, 7.3.18, 7.2.31, 7.1.33, 7.0.33, 5.6.39, 5.5.38 and 5.4.44, and PHP 8 with JIT (Just In Time) enabled.

All tested versions were built in the same way on the same system using the same compiler and PHP configuration files. The test environment is as follows:

How fast can PHP 8 be? (Performance Testing)

The test results are as follows:

How fast can PHP 8 be? (Performance Testing)

The above figure shows the performance results of using PHPbench to test each version of PHP. It can be seen that there is a small improvement from PHP 7.4 stable to PHP 8, which is about 7% improvement. However, if PHP 8 enables JIT, the performance improvement can be said to be very obvious, which is 92% higher than PHP 7.4 stable. As for older versions, PHP 8 with JIT offers 5x the performance of PHP 5.4.

How fast can PHP 8 be? (Performance Testing)

How fast can PHP 8 be? (Performance Testing)

The above picture is the results of the microservice benchmark test of each version of PHP. Through some of the built-in tests that come with PHP, you can see that PHP 8.0 is slightly faster than the already fast PHP 7.4, and with JIT support enabled, its speed is even faster than the rest.

How fast can PHP 8 be? (Performance Testing)

The test results in the above figure show that during the test using Phoronix Test Suite Self Tests, whether JIT is turned on or not, the performance of PHP 8

There is no significant improvement compared to PHP 7, mainly due to the I/O bottleneck, so overall there is not much difference.

How fast can PHP 8 be? (Performance Testing)

How fast can PHP 8 be? (Performance Testing)

Similarly, in terms of rendering testing and merge testing, JIT-enabled PHP 8 did not produce a significant advantage, but compared with the older version Compared with PHP 5, the performance of PHP 8 has been significantly improved.

How fast can PHP 8 be? (Performance Testing)

The above is the detailed content of How fast can PHP 8 be? (Performance Testing). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:sina.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!