note 102384 added to language.operators.assignment
| From: | Peter at osu1 dot php dot net | Date: | Fri, 11 Feb 2011 09:41:50 +0000 |
| Subject: | note 102384 added to language.operators.assignment | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-176887@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 69.147.83.197
Probable Submitter: 89.179.242.131
----
Manual Page -- http://www.php.net/manual/en/language.operators.assignment.php
Edit -- https://master.php.net/note/edit/102384
Del: integrated -- https://master.php.net/note/delete/102384/integrated
Del: useless -- https://master.php.net/note/delete/102384/useless
Del: bad code -- https://master.php.net/note/delete/102384/bad+code
Del: spam -- https://master.php.net/note/delete/102384/spam
Del: non-english -- https://master.php.net/note/delete/102384/non-english
Del: in docs -- https://master.php.net/note/delete/102384/in+docs
Del: other reasons-- https://master.php.net/note/delete/102384
Reject -- https://master.php.net/note/reject/102384
Search -- https://master.php.net/manage/user-notes.php