The first benchmark of WordPress requests/second on Peachpie 0.9 versus PHP 7.2 (without opcache):
Array caching allows us to speed up the construction of arrays with constants significantly in order to save CPU and memory:
For loops with an optimized control variable can be executed significantly faster with Peachpie compared to non-optimized control variables:
By using Call Sites, Peachpie outperformed PHP 7 by significant amounts. Using a direct call, the difference is even bigger:
Include is one of the most frequently used constructs in PHP, and yet it has a significant overhead due to the necessity of looking into hashtables. No such process is required in Peachpie, which is why this construct is handled incomparably faster than in PHP 7:
One of the cases where PHP static locals are perhaps easier to use than .NET statics. Here’s how Peachpie fares compared to PHP:
Despite the incredible improvement between PHP 5.6 and PHP 7, Peachpie still outperforms PHP when it comes to static fields.
Demonstrating the strength of Roslyn-powered call sites:
Benchmarking a simple mathematical operation using the Leibniz formula for Pi:
Measuring various metrics on a concurrent user load of 1000 using a simple test script: