Re: [PHP-DEV] [PATCH] Some string changes/optimizations

2008-07-10 Thread Matt Wilmas
Hi all, I had been meaning to update this patch for a while (after conflicting updates to some files), and finally did. :-) See original message for more details... There's been one change for strings -- before, I was moving the first ADD_* op into INIT_STRING, but wasn't too satisfied with

Re: [PHP-DEV] [PATCH] Some string changes/optimizations

2008-07-10 Thread Nuno Lopes
] To: internals@lists.php.net Cc: Dmitry Stogov [EMAIL PROTECTED]; Nuno Lopes [EMAIL PROTECTED] Sent: Thursday, July 10, 2008 1:45 PM Subject: Re: [PHP-DEV] [PATCH] Some string changes/optimizations Hi all, I had been meaning to update this patch for a while (after conflicting updates to some files

Re: [PHP-DEV] [PATCH] Some string changes/optimizations

2008-07-10 Thread Scott MacVicar
-printing.. Nuno - Original Message - From: Matt Wilmas [EMAIL PROTECTED] To: internals@lists.php.net Cc: Dmitry Stogov [EMAIL PROTECTED]; Nuno Lopes [EMAIL PROTECTED] Sent: Thursday, July 10, 2008 1:45 PM Subject: Re: [PHP-DEV] [PATCH] Some string changes/optimizations Hi all, I had

Re: [PHP-DEV] [PATCH] Some string changes/optimizations

2008-07-10 Thread Nuno Lopes
: Dmitry Stogov [EMAIL PROTECTED]; Nuno Lopes [EMAIL PROTECTED] Sent: Thursday, July 10, 2008 1:45 PM Subject: Re: [PHP-DEV] [PATCH] Some string changes/optimizations Hi all, I had been meaning to update this patch for a while (after conflicting updates to some files), and finally did. :-) See

Re: [PHP-DEV] [PATCH] Some string changes/optimizations

2008-05-07 Thread Matt Wilmas
Hi Felipe, I don't know. :-/ That's a pretty big discrepancy... (Did you do a complete recompile before and after the patch?) With your test, timed with microtime() on my old Win2k system (release/non-debug), I get 1.56s before and 1.54s after -- about what I'd expect after doing my own random

Re: [PHP-DEV] [PATCH] Some string changes/optimizations

2008-05-06 Thread Matt Wilmas
Hi Rasmus, Sorry about the patch format. :-/ It's been updated to correct that, as well as fix a test failure that Felipe mentioned. And as Felipe said, the invalid opcode is because the patch doesn't include the zend_vm_execute.h changes, and zend_vm_gen.php needs to be run first. I also

Re: [PHP-DEV] [PATCH] Some string changes/optimizations

2008-05-06 Thread Matt Wilmas
Hi Felipe, all, The patches have been updated to fix the failing nowdoc_015.phpt test. http://realplain.com/php/string_optimizations.diff http://realplain.com/php/string_optimizations_5_3.diff The problem was that after removing the ST_START_NOWDOC stuff, the NOWDOC_CHARS pattern wasn't

Re: [PHP-DEV] [PATCH] Some string changes/optimizations

2008-05-06 Thread Felipe Pena
Hi Matt, about optimization..., do you have any test for comparison? Why, in my crazy test (http://rafb.net/p/ZzQQQP97.html), the actual code is more faster than your patch. real0m1.156s vs real0m1.368s (using time command) I'm just curious, i'm not against your patch. Thanks. Em

[PHP-DEV] [PATCH] Some string changes/optimizations

2008-05-05 Thread Matt Wilmas
Hi all, This patch... Saves one opcode per interpolated string by moving what was the first ADD_STRING/ADD_VAR op into INIT_STRING; changes the ADD_[CHAR|STRING|VAR] op types from (TMP, whatever) to (whatever, UNUSED), since that seems to make more sense (see ADD_ARRAY_ELEMENT) and simplifies

Re: [PHP-DEV] [PATCH] Some string changes/optimizations

2008-05-05 Thread Nuno Lopes
Thanks Matt for the nice work :) Also removed the ST_START_[HEREDOC|NOWDOC] states in the scanner, by doing their work (to catch immediate ending label) in the initial heredoc rule. This one was in my todo list as well. I think there might be other places where a similar optimization can

Re: [PHP-DEV] [PATCH] Some string changes/optimizations

2008-05-05 Thread Rasmus Lerdorf
A bit of a messy patch in that it doesn't have a single top-level directory, but after hacking it, it applied. For others testing this, make sure you run ext/tokenizer/tokenizer_data_gen.sh and of course genfiles with the latest re2c. I'm still not getting something that works though.

Re: [PHP-DEV] [PATCH] Some string changes/optimizations

2008-05-05 Thread Felipe Pena
Fatal error: Invalid opcode 56/16/8. in /Users/rasmus/php53/run-tests.php on line 547 Could we get a cleaner patch to have a look at? One that doesn't hurt my brain quite as much to get working? Because he doesn't attached the regenerated zend_vm_execute.h in the patch. Matt Wilmas