Okay good insight on the For loops with Breaks. I am doing that sometimes in my code...maybe I should switch those to While loops for performance.
What is the best way to profile one's code? By profile I mean figure out what parts of the code are slower than the rest? There are all sorts of profiling tools for common languages like C, Java, etc, but I'm not sure if there are any tools available to SC2 modders? I mean, let's just get right to the bottom of this and figure out what takes longer to run and when...
Suggest you add a section about variable, function, and action naming conventions. For example, for variables I tend to use camelCased C-like conventions based on type, such as:
Based on what I've read and the fact that I've used nested For loops many times with good performance, I suggest you remove the section about using While loops over For loops. You're simply suggesting a more difficult path afaik.