Reply to Re: Performance impact about unquoted strings

Your name:

Reply:


Posted by Erwin Moller on 09/13/06 07:41

Jerry Stuckle wrote:

<snip>

>
> Put them back in. Not having them is just sloppy programming. And a
> few hundred bytes are not going to make much difference.
>

Dito.
That is good advise.

And even is this 'remove quotes' trick would give you a speedadvantage, it
is not a good move.
Never compromise the readability of your code for a small gain in speed or
size, unless you have a very compelling reason.

If your script is slow find out WHY it is slow first so you know what to
fix. This can be done easily by using microtime or more elegantly by using
a profiler. (I never needed one with PHP. Simple benchmarking with rude
timerfunctions works just fine to spot the CPU-hungy routines/structures.)

If your script is not slow, don't fix it.

A general word of advise: Never try to outsmart a serious
programminglanguage. You can bet on it the makers of the language did that
for you already in ways you cannot think up yourself.
Do yourself a favor and put clearity of your code in the first place.

Regards,
Erwin Moller

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация