ginal ======
> From: Dmitry Stogov
> To: Benjamin Coutu
> Date: Fri, 16 Jan 2015 17:12:34 +0100
> Subject: Re: [PHP-DEV] Generating more efficient code for while-loop
>
> Hi Benjamin,
>
> Thanks for idea.
> With PHP7 AST compiler, it's quite easy to implement this
==
From: Dmitry Stogov
To: Benjamin Coutu
Date: Fri, 16 Jan 2015 17:12:34 +0100
Subject: Re: [PHP-DEV] Generating more efficient code for while-loop
Hi Benjamin,
Thanks for idea.
With PHP7 AST compiler, it's quite easy to implement this (it took us 15
minutes to try :)
However, it doesn
On Fri, Jan 16, 2015 at 6:09 PM, Dmitry Stogov wrote:
> See the patch for "while" and "for" loops
>
> https://gist.github.com/dstogov/9cc5767a14f3b88e1275
>
> All tests passed.
> The patch leads to 2% improvement in number of CPU instructions retired on
> bench.php.
> Unfortunately, It doesn't ma
See the patch for "while" and "for" loops
https://gist.github.com/dstogov/9cc5767a14f3b88e1275
All tests passed.
The patch leads to 2% improvement in number of CPU instructions retired on
bench.php.
Unfortunately, It doesn't make any visible speed difference.
Anyway, I'm going to commit it on Mo
Hey:
On Sat, Jan 17, 2015 at 12:12 AM, Dmitry Stogov wrote:
> Hi Benjamin,
>
> Thanks for idea.
> With PHP7 AST compiler, it's quite easy to implement this (it took us 15
> minutes to try :)
yeah... by handy :)
> However, it doesn't make big improvement on our benchmarks.
in reallife app, IR has
Hi Benjamin,
Thanks for idea.
With PHP7 AST compiler, it's quite easy to implement this (it took us 15
minutes to try :)
However, it doesn't make big improvement on our benchmarks.
We will take a look into possibilities to apply your idea to other patterns
(e.g. for and foreach loops).
Anyway, it
Hello,
Please consider the following PHP code:
while ( ) {
}
It currently compiles to something like this for the Zend Engine:
0:
1: JMPZ -> 4
2:
3: JMP -> 0
4: ...
This can easily be rewritten in an equivalent but much more efficient form:
0: JMP -> 2
1:
2:
3: JMPNZ -> 1
The trick i