Re: [PATCH] Some string changes/optimizations
| From: | Felipe Pena | Date: | Tue, 06 May 2008 19:44:58 +0000 |
| Subject: | Re: [PATCH] Some string changes/optimizations | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37503@lists.php.net to get a copy of this message | ||
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.
real 0m1.156s
vs
real 0m1.368s
(using time command)
I'm just curious, i'm not against your patch.
Thanks.
Em Ter, 2008-05-06 às 09:05 -0500, Matt Wilmas escreveu:
> 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 matching on:
>
> <<<'EOT'
> SingleLineOfTextThatMatchesThe_LABEL_Pattern
> EOT;
>
> I updated NOWDOC_CHARS, I think simplifying it a bit and making it more like
> HEREDOC_CHARS. (And this made zend_language_scanner.c ~5K smaller.) I
> previously tried to change it, and it just hung PHP when scanning a nowdoc
> (endless loop being generated somewhere, etc.), so I left it alone. Looking
> into it more now, with the new pattern, re2c is messing up (endless loop)
> with
>
> <ST_NOWDOC>{NOWDOC_CHARS}*{NEWLINE}+{LABEL}";"?[\n\r]
>
> And I had to change it to
>
> <ST_NOWDOC>({NOWDOC_CHARS}+{NEWLINE}+|{NEWLINE}+){LABEL}";"?[\n\r]
>
> Though the original should be equivalent... Well, hopefully it's all
> working correctly now!
>
>
> - Matt
>
>
> ----- Original Message -----
> From: "Felipe Pena"
> Sent: Monday, May 05, 2008
>
> > [...]
> > Hi Matt, the nowdoc_015.phpt fails in HEAD.
> >
> > --
> > Regards,
> > Felipe Pena.
> >
>
--
Regards,
Felipe Pena.