PHP 7.3 benchmarks
My previous post about our recent upgrade to PHP 7.3 has been incredibly well received — thank you to everyone who reached out or sent me an email with follow-up questions!
The most common question of them all, though, was this:
"What kind of performance improvements and speed-ups did you notice in your particular real-world case?"
And honestly, I'm more than happy to share our results publicly, as we've been running benchmarks on every new version of our codebase for years now — and this way I can put those benchmarks to an even better use. 😃
Compared to PHP 5.6 that we had been previously running for a relatively long time, the newest PHP 7.3 performs amazingly well:
- When processing large-scale data, we can now run 1,000,000 standardized operations in 0.453 seconds where that same work-load took 0.818 seconds before. These results have been measured repeatedly over roughly 100-million-op work-loads, with averages taken. That's an 80.5% improvement!
- When running a really complex operation on a somewhat sizable dataset, we now get the same result in 10.48 seconds that previously took 14.84 seconds — which is another 41.5% improvement.
- And finally, under simulated heavy website traffic load, our website can now serve 285% as many requests per second as it could before! In other words, that's a 1.85x speed-up.
These results are mind-blowing for something that required us to rewrite a relatively small part of our codebase! Although, there is a caveat...
As soon as we started the required rewrite of the incompatible parts of our code, we decided (in true programmer fashion!) to pull off a major multi-month code-refactoring effort that touches virtually all of our existing code.
And as a final result, we're looking to get the average performance increase somewhere into the 300-400% range... while making our code even more robust!
It's going to be a huge win for both our customers and our dev team, and we couldn't be more excited about it! Stay tuned! 😃
Cutting-edge PHP 7.3
This past year we've been working so much on back-end stuff that is silently making Spin Rewriter even better and faster that I sometimes struggle to tell you about all the updates we've been rolling out.
Remember my recent two posts about the Spin Rewriter website switching to HTTP/2 and about the huge code refactoring process that is currently underway?
Well, a significant part of our front-end (customer-facing) code that makes the Spin Rewriter website work is written in PHP. Yes, the same good old PHP that powers 79.1% of the web, including Wikipedia, Facebook, all WordPress websites, etc.
And recently, a new version of PHP was officially released. This brand new PHP 7.3 version makes the language more robust than ever, while — and this is equally as important! — making it incredibly fast.
Now, most times when there's an update to an already established programming language or an interpreter (which is the software that actually takes your PHP code and runs it), the improvements are absolutely minuscule.
But this recent upgrade to PHP 7.3 is vastly different. Who better to tell you all about it than the creator of PHP, Mr Rasmus Lerdorf, himself? Here's a short video that takes you from the beginnings of PHP to what makes the newest PHP 7.3 so special...
The takeaway is this: The PHP team worked extremely closely with Intel engineers to make the newest version of the language perform as well as it possibly can on modern CPUs, with their low-level caches, branch predictors, etc.
The results speak for themselves — just check out these benchmarks!
In most cases PHP 7.3 is 150-200% or even 300% faster than PHP 5.6 which was the standard up until very recently, and what the Spin Rewriter website was running on until last year.
And at last, this brings me to my final point: YES, if you noticed a significant speed-up when using Spin Rewriter about two months ago, that was because we've now been running the newest PHP 7.3 on our live (production) servers for quite some time!
It's this sort of behind-the-scenes work that makes a HUGE difference in the final user experience. And we're happy to keep up with the times for our amazing customers — which is you guys! 😃
For more posts, check out the Monthly Archives.
Our blog posts let our users stay up-to-date with all of the updates here at Spin Rewriter. This way you can discover all of the latest features — so you can try them out and tell us what you think.
We really appreciate all of your feedback — thank you!