Comparing the calculation performance of PHP8 and PHP7

With the release of the latest version of php, it has brought huge performance improvements to php, mainly by adding support for JIT timely compilation. The following is a test of computing performance, and concurrent performance has not been tested.

$start = microtime(true);
$sum = 0;
for ($i = 0; $i < 10000000000; $i++) {
    
    
        $sum += $i;
}
$end = microtime(true);
echo $end - $start;
php7.2 takes 164s
php8.0 takes 60s

From the above results, the performance improvement is still great

Guess you like

Origin blog.csdn.net/qq_41526316/article/details/110264922