THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/03/2011 at 08:19, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform:
Language(s) :
---------
Hi there,
I'd like to write an article about efficient programming, but I need some things confirmed by MAXON or by people who know good what is happening internally in a computer.
1. Global variables or struct ?
Of course, global variables where they're not needed are senseless and inefficient.
But what if I really need global variables ?
And let's say: many of them.
Is it better to create a struct or should I acces to a bunch of global variables ?
2. Functions & variables
Using functions does always need more capacity than reading out a variable.
Even if I need a value given by a function only two times, it would be more efficient to create a variable for it. Is this statement right ?
New questions coming soon :joy:
I would appreciate help
-Niklas