Why PHP 7.0’s Performance Leap Could Outrun HHVM – Insights from Rasmus Lerdorf
PHP 7.0, released after a decade of development, delivers more than double the speed of PHP 5 and rivals Facebook’s HHVM by cutting memory usage, optimizing CPU cache behavior, and tackling the challenges of adding a JIT compiler to a dynamic language.
After a decade, PHP 7.0 is scheduled for release on December 12, 2015, promising a performance breakthrough that can be more than twice as fast as PHP 5 and even faster than Facebook’s HHVM in many cases.
Rasmus Lerdorf, the creator of PHP, explains that the speed gains come from extensive memory and engine optimizations, such as reducing the size of the zval structure from 24 to 16 bytes and shrinking hash tables, as well as careful examination of core functions.
Beyond memory reduction, the team focused on CPU cache‑line behavior and modern CPU architecture compatibility, achieving cumulative improvements that, while each may contribute less than 0.5%, together deliver a substantial overall boost.
Although HHVM was built for Facebook’s specific workloads and is not universally applicable, PHP 7 aims to give any web developer—whether using Drupal, OpenCart, WordPress, or other frameworks—performance comparable to HHVM without sacrificing compatibility.
The introduction of a JIT compiler to PHP presents additional challenges because PHP’s dynamic typing makes type prediction difficult; nevertheless, prototype JIT implementations have shown up to ten‑fold speedups for certain repetitive tasks, though they have not yet accelerated WordPress.
Lerdorf emphasizes that PHP’s future should not depend on any single contributor’s code; the goal is a language where no line is written by the original author, encouraging community‑driven evolution.
Overall, PHP 7.0 represents a major step forward in backend development, combining high performance with broad framework support.
Source: ITHome Taiwan edition, editorial team
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
