- Joined
- Mar 16, 2008
- Messages
- 941
Hey Guys
I have a rather simple question... I would test it myself, but I never get the stopwatch function working. Maybe someone could help me
I just want to know what is faster:
a) Linear Searching:
Depending on the situation there are around 5-30 structs to loop through.
b) Game Cache:
Have no example, since I'm using "a)" at the moment. I just would attach the ID of the struct to the unit.
What would be faster?
It's quite important, since this system will run very often and I want to improve the performance as much as possible
Greets, Justify
I have a rather simple question... I would test it myself, but I never get the stopwatch function working. Maybe someone could help me
I just want to know what is faster:
a) Linear Searching:
JASS:
loop
set I = I+1
set Data = AggroData[I]
exitwhen I >= StructCount or Target == Data.Unit
endloop
b) Game Cache:
Have no example, since I'm using "a)" at the moment. I just would attach the ID of the struct to the unit.
What would be faster?
It's quite important, since this system will run very often and I want to improve the performance as much as possible
Greets, Justify