|
-
Assign function to variable (for speed)
hi Flash gurus!
I've read in various places that it is faster to assign a function to a variable
e.g var mround:Function = Math.round()
But I dont understand how that can be faster. Doesn't it still have to look up Math.round() when mround is called or does it copy the code from Math.round() into 'mround'?
I've accepted that it's faster - I just want to know why.
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
|