Re: echo or print ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tijnema ! wrote:
On 4/22/07, Stut <stuttle@xxxxxxxxx> wrote:
Tijnema ! wrote:
> But what else would you use a lot in your code?
> all commonly used things (like while, if, echo, etc) are just (nearly)
> as fast as their alternatives (for, print, etc).
> Other functions (like file/stream) might be some performance
> difference, but you probably use this only a few times in your script.
> So there's not a bigger performance difference then when optimizing
> echo/print.

Get your head out of the details. Try file-based caching against DB
access.
And compare that with RAM caching ;)

Or SQL query optimisation. Or even server configuration tuning.
All these things and others on the same level are far more worthy of
your time.

-Stut

So, optimizing is useless :P
I see no point in doing it, even more when it's only for personal
usage. The time used for writing optimized code is probably far more
then the time you save by running optimized code. :)

I hope that smiley means you're joking. Optimising is not useless, and I've never said it is. However, you have to do so where it's going to have the biggest impact. What I'm basically saying is you should be optimising logic before even thinking about whether you're using the most optimised functions.

Are you sure that your code doesn't do anything it doesn't need to? Do you do a whole load of initialisation for each request that could be cached in some way? Is every part of that initialisation needed for every page request, or should it be doing different things on different pages.

IMHO, the kind of developer that gets hung up on details like echo or print is one that is unlikely to accomplish a lot in any given day.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux