04.05.2016, 10:23
Quote:
This is a proper way of doing it
pawn Code:
But for this thread this is completely unnecessary just for the minimal performance difference, it's not worth changing or doing in your current or future game modes. Eh I could see someone using it if they just found out about this way, and want to use it for the nano second differences, but not changes to already made GM's unless their that hungry for the performance. |
What people not seem to understand is this topic first assumes(or should) you have a heavily repetitive code, I.E a loop in OPU (Which honestly you shouldn't, but for the sake of example ...) then, having just 100 nanosec saved is alot for a code that loops MAX_SOMETHING 40 times a second.
And also even tho speed might not matter, some of these tiny optimizations are better coding habits, for example I won't sacrifice readability for nano speeds speeds like this:
PHP Code:
for(new i=MAX_SOMETHING;--i!=-1;) //this was bit faster than normal one as I remember
PHP Code:
new HouseI[MAX_HOUSES][HouseInfo],
Iterator: Houses<MAX_HOUSES>,
Housebla[MAX_HOUSES],
Houseblabla[MAX_HOUSES],
Houseblablabla[MAX_HOUSES];