10

PHP 8.1: real-life performance benchmarks

 2 years ago
source link: https://www.stitcher.io/blog/php-81-performance-in-real-life
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
PHP 8.1: real-life performance benchmarks

Scout APM helps PHP developers pinpoint N+1 queries, memory leaks & more so you can troubleshoot fast & get back to coding faster. Start your free 14-day trial today.

« back — written by Brent on November 25, 2021

PHP 8.1: real-life performance benchmarks

I did a very quick performance test because I wanted to know the impact of PHP 8.1 on my real-life projects.

These benchmarks were taken on my local machine, and only meant to measure the relative difference between PHP 8.0 and 8.1. I benchmarked a page that showed lots of data, with lots of classes loaded, as I expected that inheritance cache would have the largest performance impact.

Metric PHP 8.0 PHP 8.1 Requests per second (#/sec) 32.02 34.75 Time per request (ms) 28.777 31.232

The results seem to be in line what what Dmitry originally reported when he added this feature: a 5-8% performance increase.

Noticed a tpyo? You can submit a PR to fix it.

If you want to stay up to date about what's happening on this blog, you can follow me on Twitter or subscribe to my newsletter:

Email

Footnotes

The Road to PHP 8.1

New in PHP 8.1 — A comprehensive list of all things new in PHP 8.1

Enums in PHP 8.1

Readonly properties in PHP 8.1

New in initializers in PHP 8.1

Fibers with a grain of salt

Next up:  PHP 8.1 in 8 code blocks

Follow me: TwitterRSSNewsletterPatreonGitHub

© 2021 stitcher.io — Cookies & Privacy


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK