View Single Post
  #64  
Old 07-05-2003, 10:08 AM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
Yes, in some situations, precalculation is good. As in the example Kai showed. It would have to recalculate that value a lot of times in the for loop, while if it's set before the for loop, then it only needs to read the final value.

Of course, precalculating isn't always necassary. If you have an event that is only going to run one time, there isn't a need.
__________________

Put this image in your sig if you support Bomy Island! (g2k1 revision)
play bomberman while you wait!


Reply With Quote