| 04-29-2007, 07:11 PM | #1 |
i wonder which method is fastest (performance) to loop trough a unit group. Is it to use the ForGroup() native or is it to use FirstInGroup method. Anyone got any idea? |
| 04-29-2007, 07:53 PM | #2 |
ForGroup is faster if you must keep the unitgroup FirstOfGroup is faster if you don't care about destroying the unitgroup |
| 04-29-2007, 08:08 PM | #3 | |
Quote:
|
| 04-29-2007, 08:20 PM | #4 |
1. Create a blank map 2. Write a function to test one loop 3. Write a function to run (2) 100-300 times with TriggerEvaluate 4. Write another function to run (3) 100-300 times with TriggerEvaluate 5. Write a trigger to run (4) at TriggerSleepAction(0.) after map start 6. Start warcraft, move mouse, count seconds on windows or wall clock until warcraft unfreezes 7. Go back to 2-6 but switch to the other loop, then compare the times and tell us what you find. |
| 04-29-2007, 11:01 PM | #5 |
hm its ok, i have choosen to use forgroup, since i wanted to avoid loop :P |
