Re: [PEPr] +1 for XML::XML_Feed_Parser
| From: | Arnaud Limbourg | Date: | Fri, 21 Oct 2005 05:12:18 +0000 |
| Subject: | Re: [PEPr] +1 for XML::XML_Feed_Parser | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-40242@lists.php.net to get a copy of this message | ||
Sean Coates wrote:
Sorry to jump in...I don't remember where and cannot find it on google doing a quick search. Alan pointed out the other day that auditing code which uses ' is easier because you know no variable substitution is going to occur so it is easier to read. Arnaud.JP> I would prefer using ' for all strings except those with JP> backslash expressions as variable interpolation is more expensive JP> and less visible than concatenation.Justin, are you sure? I always understood concatenation to be slower because memory had to be allocated separately for each string (prior to concatenation) whereas with interpolation, the memory is already allocated. Not trying to start a fight--I actually want to know your interpretation/proof. I remember seeing a comment from Ilia on a blog post about that. Ilia did several tests and the number of opcodes is smaller when doing concatenation.