Re: echo or print ?
| From: | Richard Lynch | Date: | Sun, 22 Apr 2007 04:08:11 +0000 |
| Subject: | Re: echo or print ? | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-253463@lists.php.net to get a copy of this message | ||
On Sat, April 21, 2007 5:20 pm, 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.
You use valgrind/callgrind and find out where your bottlenecks are and
optimize those.
You also benchmark your non-PHP stuff which is often the bottleneck in
the first place.
Optimizing random bits of code that aren't your bottleneck is just
wasting your most precious resource: YOUR TIME!
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?