Why are you asking?  Do you have code that's taking too long to run,
and if you do have you tested it and found that count() is what's
making it take too long?  Because if neither of these are the case,
then what you're doing is premature optimization, which we all know is
the root of all evil.

(But since you asked, it probably will, but to know for sure you'd
need to do it both ways, time them both and compare.)

-Dan

On Fri, Dec 18, 2009 at 11:38 PM, Wade Preston Shearer
<[email protected]> wrote:
> If you are going to be calling a function (such as count() a few times
> within a script, is there any performance benefit to calling it once
> at the beginning, storing the result in a value and then using the
> value instead of recalling the function each time?

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to