Re: new manual chapter suggestion

From: Date: Mon, 30 Jul 2001 08:06:32 +0000
Subject: Re: new manual chapter suggestion
References: 1 2  Groups: php.dev php.doc 
Request: Send a blank email to php-dev+get-61479@lists.php.net to get a copy of this message
UNSUBSCRIBE ME PLEASE!!!!!!!!!!!!!! Alexander Merz schrieb: > > - use echo "aaa" , "bbb", "ccc" instead of echo > > "aaa" . "bbb" . "ccc" > > because with the later you use more memory [Jim] > > - echo is a little bit faster then print [Rasmus] > > This would make a new chapter, with some nifty tips > > about how you can improve the performance of your > > programs. > Handle some 'hints' with care. This is typical "assembler thinking", where > you > had a list of the executions time of every command next to the keyboard. PHP is > a high-level interpreter language and the runtime of a command depends not of > the architecture of the processor. The speed or memory usage of a functions > depends on the implementation, which can differs from version to version. > > echo "aaa", "bbb" saves at the moment memory, but can you guarantee, that > it > saves memory in 4.1? > > Such a chapter would brings beginner to look for time and memory saving > functions, instead of thinking about the best implementation of a algorithm, > which could better improve the performance then a bad implemention 'tuned' with > some nifty tips, independend of the used PHP-version. > > I see some sources, where beginners used twenty str_replace's instead of one > preg_replace, because somebody said to them str_replace is faster then > preg_replace... > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.dev (#61479) next »