[thelist] declaring once verse not
Damien COLA
damiencola at wanadoo.fr
Thu Aug 14 08:54:04 CDT 2003
processor usage is wasted **each time** the function is called.
memory usage is wasted **when** you store a value in a variable for
latter use.
better waste memory when there are LOTS of calls to the function/value
because then the memory used is the same no matter how many times you
need to retrieve the variable's value either one or a million, memory
usage will be X bytes and that's it, whereas the processor usage is
wasted each time you call the function, but also processor usage is ZERO
when the unfction is not used. So it's a question of balance.
Easier way is to store the value once and use the variable, nowadays
computers got plenty of RAM and many billions processor cycles !! ;-)
Cheers,
Damien COLA
-----Original Message-----
Though there is probably no great difference in this one use, would it
add up if one style is used alot over another?
More information about the thelist
mailing list