Cokemonkey11
Spell Reviewer
- Joined
- May 9, 2006
- Messages
- 3,570
I benchmarked that with FPS results a couple years ago and FoG was faster if more than 1 or 2 units needed to be enumerated.
Just to clarify, are you confirming that a function like this:
JASS:
scope test
globals
private group iterator=CreateGroup()
private group swap=CreateGroup()
private group temp
endglobals
private function fgSwap takes nothing returns nothing
local unit FoG
loop
set FoG=FirstOfGroup(iterator)
exitwhen FoG==null
//
call GroupAddUnit(swap,FoG)
call GroupRemoveUnit(iterator,FoG)
endloop
set temp=iterator
set iterator=swap
set swap=temp
endfunction
endscope
is FASTER than
ForGroup
for groups of size 2 and greater?