Slide 46
Slide 46 text
From: PHP7 Engineer
Sent: Mar 16, 2016
To: PHP7 Team; Chief Architect
Subject: Exciting PHP7 news
Exciting proof of something everyone already assumes – Adam and I ran PHP5.6 and PHP7 head to head, and the results are
that PHP7 is significantly faster than PHP5.6.
Methodology
We compared running times while unit testing feature_detect_test.php (for those who are unfamiliar, this is a regex-heavy set of tests
that is notoriously long-running). PHP5.6 completed the tests in an average of 14.37 seconds, whereas PHP7 took an average of 2.9
seconds.
Conclusions
This is primarily a proof-of-concept while working in a vacuum, but it is promising that we are heading in the right direction.
Other Observations
PHP7 used up significantly more memory, as reported by PHPUnit (10MB vs 5.75MB).
The initial iteration of PHP5.6 was quite the outlier – removing that reduces the average to about 13.44 seconds.
Next Steps
Our next project is to get PHP7 to render actual pages on our site – so far this has been throwing 502s while the server segfaults.
Steps we had to take to get the unit tests to run:
• Disable codeception + dependencies
• Manually build DOM + ctype extensions
• Update MPDF to latest development branch
Below you’ll find a few charts outlining the runtimes of each individual iteration. […]