Re: [PHP-DEV] Ternary operator performance improvements

2011-10-18 Thread Stas Malyshev
Hi! On 10/18/11 2:43 PM, Alain Williams wrote: It probably does, but it is quite subtle. I was expecting the above to work since it does in C -- although in C&variable is an address which can be used in an expression ... the PHP '&' operator is different, in spite of apparent similarities. A

Re: [PHP-DEV] Ternary operator performance improvements

2011-10-18 Thread Alain Williams
On Tue, Oct 18, 2011 at 10:09:37PM +0200, Arnaud Le Blanc wrote: > Hi, > > Le Monday 17 October 2011 15:07:30, Alain Williams a écrit : > > On Fri, Oct 14, 2011 at 08:08:56PM +0200, Arnaud Le Blanc wrote: > > > Hi, > > > > > > I've already posted this patch and it has since been reviewed and > >

Re: [PHP-DEV] Ternary operator performance improvements

2011-10-18 Thread Arnaud Le Blanc
Hi, Le Monday 17 October 2011 15:07:30, Alain Williams a écrit : > On Fri, Oct 14, 2011 at 08:08:56PM +0200, Arnaud Le Blanc wrote: > > Hi, > > > > I've already posted this patch and it has since been reviewed and > > improved. I'm re-posting it for discussion before eventually commiting > > it.

Re: [PHP-DEV] Ternary operator performance improvements

2011-10-17 Thread Alain Williams
On Fri, Oct 14, 2011 at 08:08:56PM +0200, Arnaud Le Blanc wrote: > Hi, > > I've already posted this patch and it has since been reviewed and improved. > I'm re-posting it for discussion before eventually commiting it. > > The ternary operator always copies its second or third operand, which is v

Re: [PHP-DEV] Ternary operator performance improvements

2011-10-17 Thread Felipe Pena
2011/10/17 Ilia Alshanetsky : > Seems like a good patch, +1 from me on inclusion into 5.4/HEAD. > > On Fri, Oct 14, 2011 at 2:08 PM, Arnaud Le Blanc wrote: >> Hi, >> >> I've already posted this patch and it has since been reviewed and improved. >> I'm re-posting it for discussion before eventually

Re: [PHP-DEV] Ternary operator performance improvements

2011-10-17 Thread Ilia Alshanetsky
Seems like a good patch, +1 from me on inclusion into 5.4/HEAD. On Fri, Oct 14, 2011 at 2:08 PM, Arnaud Le Blanc wrote: > Hi, > > I've already posted this patch and it has since been reviewed and improved. > I'm re-posting it for discussion before eventually commiting it. > > The ternary operator

[PHP-DEV] Ternary operator performance improvements

2011-10-14 Thread Arnaud Le Blanc
Hi, I've already posted this patch and it has since been reviewed and improved. I'm re-posting it for discussion before eventually commiting it. The ternary operator always copies its second or third operand, which is very slow compared to an if/else when the operand is an array for example: $