Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29048 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80486 invoked by uid 1010); 26 Apr 2007 09:53:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 80453 invoked from network); 26 Apr 2007 09:53:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Apr 2007 09:53:16 -0000 Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain realplain.com from 209.142.136.132 cause and error) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 209.142.136.132 msa2-mx.centurytel.net Linux 2.4/2.6 Received: from [209.142.136.132] ([209.142.136.132:56620] helo=msa2-mx.centurytel.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D5/1E-00993-74170364 for ; Thu, 26 Apr 2007 05:30:48 -0400 Received: from pc1 (72-161-62-179.dyn.centurytel.net [72.161.62.179]) by msa2-mx.centurytel.net (8.13.6/8.13.6) with SMTP id l3Q9Uip4009031; Thu, 26 Apr 2007 04:30:44 -0500 Message-ID: <00d801c787e5$9119dbc0$0201a8c0@pc1> To: , "Marcus Boerger" References: <00d201c77d07$dc0819f0$0201a8c0@pc1> <004201c787b6$588705f0$0201a8c0@pc1> <1667202369.20070426091902@marcus-boerger.de> Date: Thu, 26 Apr 2007 04:30:44 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 Subject: Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings From: php_lists@realplain.com ("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 always faster for both scan/compile time and runtime. The difference is huge with, for example, a longer heredoc without variables, like the one in Sara's blog entry. And as I also mentioned, removing the ^ beginning-of-line operator from the old heredoc end token rule, it makes YY_RULE_SETUP empty in the generated C file, which had been setting yy_at_bol for *every* token matched, just for the one rule that used it. Eliminating that overhead for each token made a measurable difference in *overall scanner performance* -- I'm sure there's less difference with non-ZTS builds since YY_RULE_SETUP was referencing globals. 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 it's supposed to always be IS_STRING or dependent on UG(unicode). Thanks, Matt ----- Original Message ----- From: "Marcus Boerger" Sent: Thursday, April 26, 2007 > 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...? Did anyone try it out? :-) > > Think it can be used after 5.2.2? > > > > Matt