note 102384 deleted from language.operators.assignment by thiago
| From: | thiago@php.net | Date: | Fri, 11 Feb 2011 12:34:10 +0000 |
| Subject: | note 102384 deleted from language.operators.assignment by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-176893@lists.php.net to get a copy of this message | ||
Note Submitter: Peter, Moscow
----
Using $text .= "additional text"; instead of $text = $text ."additional text";
can seriously enhance performance due to memory allocation efficiency.
I reduced execution time from 5 sec to .5 sec (10 times) by simply switching to the first pattern
for a loop with 900 iterations over a string $text that reaches 800K by the end.