-
Local vars versus Class vars
Hey guys, if a function gets call alot of times, such as a collision detection function in a game, will it be quicker to run if the variables for the function are declared and initialised outside the function as class variables? Or should they are declared and initialise inside the function as local variables everytime it is called, for good software engineering?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|