Code Optimisation

From Bohemia Interactive Community
Revision as of 22:37, 20 January 2010 by Rommel (talk | contribs)

Categories:

Adding elements to an array

Getting position

Loops

These first two loop types are identical in speed, being more than twice as fast the proceeding two loop types.

"_y" from 0 to (count [0,0,0,0] - 1) step 1 do { ... }; { ... } foreach [0,0,0,0];

_y=0; while {_y = _y + 1; _y < count [0,0,0,0]} do { ... }; for [{_y=0},{_y<(count [0,0,0,0])},{_y=_y+1}] do { ... }