PHP 8.0, PHP8.1 vs PHP 7.4, PHP7.3 Performance

PHP 8.0 Performance vs PHP 7.x
; Enables or disables JIT compilation of patterns. This requires the PCRE
; library to be compiled with JIT support.
pcre.jit=1
opcache.jit=1
opcache.enable_cli=1
The code took 0.090858936309814 seconds to complete.
The code took 0.087525129318237 seconds to complete.
The code took 0.086302042007446 seconds to complete.
The code took 0.080528020858765 seconds to complete.
The code took 0.096591949462891 seconds to complete.
The code took 0.073684930801392 seconds to complete.
The code took 0.074541091918945 seconds to complete.
The code took 0.073902130126953 seconds to complete.
The code took 0.074251890182495 seconds to complete.
The code took 0.07374095916748 seconds to complete.
The code took 0.073745012283325 seconds to complete.
The code took 0.073945045471191 seconds to complete.
The code took 0.073848962783813 seconds to complete.
The code took 0.074243068695068 seconds to complete.
The code took 0.073872089385986 seconds to complete.
The code took 0.073964834213257 seconds to complete.
The code took 0.074733018875122 seconds to complete. root@d5a21c0335c4:/# curl localhost:8000/test.php
The code took 0.074043989181519 seconds to complete. root@d5a21c0335c4:/# curl localhost:8000/test.php
The code took 0.074050903320312 seconds to complete. root@d5a21c0335c4:/# curl localhost:8000/test.php
The code took 0.073812007904053 seconds to complete. root@d5a21c0335c4:/# curl localhost:8000/test.php
The code took 0.073884010314941 seconds to complete. root@d5a21c0335c4:/# curl localhost:8000/test.php
The code took 0.074115037918091 seconds to complete. root@d5a21c0335c4:/# curl localhost:8000/test.php
The code took 0.073699951171875 seconds to complete. root@d5a21c0335c4:/# curl localhost:8000/test.php
The code took 0.073861837387085 seconds to complete. root@d5a21c0335c4:/# curl localhost:8000/test.php
The code took 0.074131965637207 seconds to complete. root@d5a21c0335c4:/# curl localhost:8000/test.php
The code took 0.074096202850342 seconds to complete. root@d5a21c0335c4:/# curl localhost:8000/test.php
The code took 0.073999166488647 seconds to complete. root@d5a21c0335c4:/# curl localhost:8000/test.php
The code took 0.074022054672241 seconds to complete.
root@ea0a1a583ed8:/var/www/html# php -v
PHP 7.4.12 (cli) (built: Nov 18 2020 09:41:41) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
root@ea0a1a583ed8:/var/www/html# php test.php
The code took 0.099517107009888 seconds to complete.
root@ea0a1a583ed8:/var/www/html# php test.php
The code took 0.10780692100525 seconds to complete.
root@ea0a1a583ed8:/var/www/html# php test.php
The code took 0.09947395324707 seconds to complete.
root@ea0a1a583ed8:/var/www/html# php test.php
The code took 0.099421977996826 seconds to complete.
root@ea0a1a583ed8:/var/www/html# php test.php
The code took 0.10767197608948 seconds to complete.
root@ea0a1a583ed8:/var/www/html# php test.php
The code took 0.10780000686646 seconds to complete.
root@ea0a1a583ed8:/var/www/html# php test.php
The code took 0.099364995956421 seconds to complete.
root@ea0a1a583ed8:/var/www/html# php test.php
The code took 0.099454879760742 seconds to complete.
root@ea0a1a583ed8:/var/www/html# php test.php
The code took 0.10798311233521 seconds to complete.
root@ea0a1a583ed8:/var/www/html# php test.php
The code took 0.10803985595703 seconds to complete.
root@ea0a1a583ed8:/var/www/html# php test.php
The code took 0.099156856536865 seconds to complete.
root@ea0a1a583ed8:/var/www/html# php test.php
The code took 0.099501848220825 seconds to complete.
root@ea0a1a583ed8:/var/www/html# php test.php
The code took 0.099478006362915 seconds to complete.
[ec2-user@ip ~]$ php -v
PHP 7.3.21 (cli) (built: Aug 21 2020 21:12:16) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.21, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.21, Copyright (c) 1999-2018, by Zend Technologies
[ec2-user@ip ~]$ php test.php
The code took 0.10289692878723 seconds to complete.
[ec2-user@ip ~]$ php test.php
The code took 0.10567092895508 seconds to complete.
[ec2-user@ip ~]$ php test.php
The code took 0.10027503967285 seconds to complete.
[ec2-user@ip ~]$ php test.php
The code took 0.10293197631836 seconds to complete.
[ec2-user@ip ~]$ php test.php
The code took 0.1053740978241 seconds to complete.
[ec2-user@ip ~]$ php test.php
The code took 0.10305786132812 seconds to complete.
[ec2-user@ip ~]$ php test.php
The code took 0.102942943573 seconds to complete.
[ec2-user@ip ~]$ php test.php

--

--

--

True Stories about Magento 2. Melting metal server infrastructure into cloud solutions. Donate: https://paypal.me/magentasoftware?country.x=US&locale.x=en_US

Love podcasts or audiobooks? Learn on the go with our new app.

Knowing, git

The week ahead for Prophecy: Second Chance Pool, Code Upgrades, and more

Web-Scraping and Web-Automation Basics

A Curious Tale of Late Initialisation Options — Part I

Introducing Timeline Resource Grouping in Flutter Event Calendar

Introducing Timeline Resource Grouping in Flutter Event Calendar

Azure — Azure Data Factory (ADF) Overview

Building a Growth Framework Pt II: No Tester Left Behind

Top 3 Enterprise Developer Trends for 2021 and Beyond

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Yegor Shytikov

Yegor Shytikov

True Stories about Magento 2. Melting metal server infrastructure into cloud solutions. Donate: https://paypal.me/magentasoftware?country.x=US&locale.x=en_US

More from Medium

l▷ Magento Luma Frontend will be deprecated — What Now? What’s Next? Alternatives? ✔ | JaJuMa-Blog

Payment Link Strapi plugin Part 1 — The server

AWS CloudFront Signed Cookie Laravel Middleware

How to Install a .IPA file using the CLI on macOS?

Article image