Objects and Optimization
I got in the habit of creating a global variable object that contains all global variables used in the class...
private var core = {
varOne:"blahOne",
varTwo:"blahTwo"
};
then through the class i would just use core.varOne and so on. I started this because i once needed two class to be able to adjust the core variables of each other and instead of creating public get/set properties for each variable i just had to create one that referenced the core object.
Now im wondering optimization wise, how much does using core.varOne differ from just varOne. Im working with particles and a lot of variables and im wondering if using this method is slowing me down...
Thanks
|