PHP 8.1 Performance Benchmark
PHP 8.1 was officially released last week, and technology media Phoronix immediately released a performance benchmark report for PHP 8.1.
This test was conducted on an AMD EPYC 72F3 server running Ubuntu Linux. All tested versions were rebuilt on the same system with the same packages and the same build options.
The versions used for reference comparison include: PHP 8.1, PHP 8.0.13, PHP 7.4.26, PHP 7.3.33, PHP 7.0.33 and PHP 5.6.40. PHP 7.1/7.2 was excluded due to a segmentation fault when building and running in this stack.
The test environment is as follows:
The test results are as follows:
The above picture shows the use of PHPbench Test the performance results of various versions of PHP. As you can see, the language has developed quite well in the past few years since the launch of PHP 5.6. Now, while continuing the stable improvements seen in PHP 7.
As far as PHP Micro benchmarks are concerned, Phoronix believes that although they are not too useful; but judging from the test results, they are again Highlights the progress of PHP in the past few years.
And in benchmarking various code paths around XML parsing, JSON generation, and other common real-world operations using the Phoronix Test Suite itself, there is a situation . On AMD EPYC Linux servers, PHP 8.1 represents a nice improvement after being essentially flat from PHP 7.3 to PHP 8.0. Most of the significant improvements occurred during the late PHP 5.x and early PHP 7.x releases.
In terms of rendering testing, the test results in the above figure also show that the performance of PHP 8.1 continues to develop in the right direction.
It’s worth mentioning that the peak memory usage of PHP 8.1 is even slightly lower than previous PHP versions. Overall, PHP 8.1 is another good version that promotes the development of server-side programming languages. PHP 8.1 has some great additions to the language and some incremental improvements to performance that make it more competitive with other scripting languages.
Recommended: "PHP8 Usage Tutorial"
The above is the detailed content of PHP8.1 performance benchmark report is here! (Compare multiple versions). For more information, please follow other related articles on the PHP Chinese website!