Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-05-20 Thread Matt Wilmas
Hi Stas, Can we see any difference with optimal ZEND_ADD_(STRING|CHAR|VAR)? :-) Well, multiple ADD_STRINGs are one thing that optimizers/accelerators would stitch back together, because it's a "major optimization." ;-) I didn't specifically mention it in my previous messages, but since these part

Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-05-18 Thread Stanislav Malyshev
At least 2% speedup on attached script. 2% is not that impressive... Would it be better on complex strings? -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/uns

RE: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-05-18 Thread Dmitry Stogov
27; > Subject: Re: [PHP-DEV] [PATCH] Major optimization for > heredocs/interpolated strings > > > > The patch mainly improves not the parser, but generated code. It > > builds near optimal ZEND_ADD_STRING, ZEND_ADD_VAR sequence > for quoted > > strings and

Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-05-17 Thread Stanislav Malyshev
The patch mainly improves not the parser, but generated code. It builds near optimal ZEND_ADD_STRING, ZEND_ADD_VAR sequence for quoted strings and heredoc. OK, I understand that, the question is can we see any difference? We are doing quite major overhaul of the parser, so there should be a rea

RE: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-05-16 Thread Dmitry Stogov
mailto:[EMAIL PROTECTED] > Sent: Thursday, May 17, 2007 12:03 AM > To: Matt Wilmas > Cc: internals@lists.php.net; Dmitry Stogov; 'Andi Gutmans' > Subject: Re: [PHP-DEV] [PATCH] Major optimization for > heredocs/interpolated strings > > > Do we have any good performa

RE: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-05-16 Thread Dmitry Stogov
; > Subject: Re: [PHP-DEV] [PATCH] Major optimization for > heredocs/interpolated strings > > > > The updated 5.2 patch is at the same address, > > http://realplain.com/php/scanner_optimizations_5_2.diff, and the > > original was moved to > > http://realplain.

Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-05-16 Thread Stanislav Malyshev
Do we have any good performance testcases for the patch that show how it improves the parser? The updated 5.2 patch is at the same address, http://realplain.com/php/scanner_optimizations_5_2.diff, and the original was moved to http://realplain.com/php/scanner_optimizations_5_2-v1.diff -- Stan

Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-05-16 Thread Stanislav Malyshev
The updated 5.2 patch is at the same address, http://realplain.com/php/scanner_optimizations_5_2.diff, and the original was moved to http://realplain.com/php/scanner_optimizations_5_2-v1.diff I've noticed a slight difference between how PHP worked without and with this patch. Previously, if you

Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-05-16 Thread Matt Wilmas
Hi all, After an off-list discussion with Dmitry, the patch has been updated. Mostly to remove old rules I had left (that returned T_CHARACTER, etc.) since the new "super rules" can match what they did. So now every "piece" of a non-constant string returns T_ENCAPSED_AND_WHITESPACE. I also added

RE: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-04-26 Thread Andi Gutmans
ski [mailto:[EMAIL PROTECTED] > >> Sent: Thursday, April 26, 2007 8:53 AM > >> To: Matt Wilmas > >> Cc: internals@lists.php.net; Marcus Boerger > >> Subject: Re: [PHP-DEV] [PATCH] Major optimization for > >> heredocs/interpolated strings > >> > >

RE: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-04-26 Thread Andi Gutmans
sday, April 26, 2007 8:53 AM > To: Matt Wilmas > Cc: internals@lists.php.net; Marcus Boerger > Subject: Re: [PHP-DEV] [PATCH] Major optimization for > heredocs/interpolated strings > > On Apr 26, 2007, at 2:30 AM, Matt Wilmas wrote: > > > BTW, regarding HEAD, for you,

Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-04-26 Thread Marcus Boerger
If it checks > out I'm definitely fine with commiting. > Andi >> -Original Message- >> From: Andrei Zmievski [mailto:[EMAIL PROTECTED] >> Sent: Thursday, April 26, 2007 8:53 AM >> To: Matt Wilmas >> Cc: internals@lists.php.net; Marcus

Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-04-26 Thread Antony Dovgal
On 04/26/2007 07:53 PM, Andrei Zmievski wrote: On Apr 26, 2007, at 2:30 AM, Matt Wilmas wrote: BTW, regarding HEAD, for you, Andrei, or anyone, I think I noticed a bug, unrelated to my changes: CG(literal_type) isn't set for backticks in the parser, so it winds up being whatever was last set

Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-04-26 Thread Andrei Zmievski
On Apr 26, 2007, at 2:30 AM, Matt Wilmas wrote: BTW, regarding HEAD, for you, Andrei, or anyone, I think I noticed a bug, unrelated to my changes: CG(literal_type) isn't set for backticks in the parser, so it winds up being whatever was last set. I would've changed it, but didn't know if i

Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-04-26 Thread Matt Wilmas
Hi Marcus, Yeah, I did a lot of benchmarking different things ;-) and mentioned some statistics in my original message -- such as 10-15% *overall* improvement using ApacheBench on a few scripts. The difference for specific strings depends on what the string looks like (length, etc.), but is alway

Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-04-26 Thread Marcus Boerger
Hello Matt, the patch looks interesting. I think we should commit it to HEAD. And if it works good we can add it to 5.3 once we created it. Did you do any measurements? best regards marcus Thursday, April 26, 2007, 5:52:43 AM, you wrote: > Hi again, > Hmm, not a single reply about this patch

Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings

2007-04-25 Thread Matt Wilmas
Hi again, Hmm, not a single reply about this patch...? Did anyone try it out? :-) Think it can be used after 5.2.2? Matt - Original Message - From: "Matt Wilmas" Sent: Thursday, April 12, 2007 Subject: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings > Hi all, >