- Joined
- Feb 22, 2012
- Messages
- 74
I am wondering if using integers over reals is significantly more efficient as far as hashtables and global variables.
I could change many of my over-time spells. Because they are all based on either a 0.04 second (for missiles), or a 0.20 second (for damage over time) timer, I could save their "durations" as integers (number of ticks) instead of reals.
I have uploaded the map I am working on so you get a sense of how many globals there are for just one hero. As you can see, the Living Bomb spell is not even started and the secondary effect of the Wither Spell is not in yet. Would changing some of those variables to integers save some memory?
Also a newb question about leaks: if you destroy / remove a variable do you still have to set = null before you re-use it?
I could change many of my over-time spells. Because they are all based on either a 0.04 second (for missiles), or a 0.20 second (for damage over time) timer, I could save their "durations" as integers (number of ticks) instead of reals.
I have uploaded the map I am working on so you get a sense of how many globals there are for just one hero. As you can see, the Living Bomb spell is not even started and the secondary effect of the Wither Spell is not in yet. Would changing some of those variables to integers save some memory?
Also a newb question about leaks: if you destroy / remove a variable do you still have to set = null before you re-use it?