| 06-23-2008, 10:36 PM | #1 |
I'd like to know what is the fastest method of going through a number of structs/any other things, with regards to timers A - Looping through a series of (whatevers) on a single timer i.e. JASS:local integer i = Count loop exitwhen i <= 0 //etc B1 - Attaching the data to separate timers using HSAS B2 - Attaching the data to the same timer using HSAS (if that's possible) C1 - Same as B1, using HAIL C2 - Same as B2, using HAIL (again, is it possible?) D1 - Same as B1, using ABC D2 - Same as B2, using ABC (,again is it possible?) E - Timer Ticker F1 - B1 using gamecache F2 - B2 using gamecache (again, is it possible?) G - Any other attachment systems involving timers :P |
| 06-23-2008, 10:54 PM | #2 |
Toadcop? |
| 06-24-2008, 12:20 AM | #3 |
A is by far the fastest |
| 06-24-2008, 12:35 AM | #4 |
Simpler = Faster. Always. Unless, of course, you have grotesquely bottlenecked hardware... |
| 06-24-2008, 01:13 AM | #5 |
A is the fastest, possibly followed by E. |
| 06-24-2008, 08:59 AM | #6 |
Thanks for that :) @Dark.Revenant: Not 100% sure on what you're saying ![]() |
| 06-24-2008, 09:05 AM | #7 |
unless you have fucked up computer hardware |
| 06-24-2008, 09:16 AM | #8 |
I was talking about the simpler = faster bit :P Faster in what way? In coding the stuff, or in how fast the code works when it is actually used? |
| 06-24-2008, 09:24 AM | #9 |
10 year old PC |
| 06-24-2008, 10:56 AM | #10 |
If you can make the thing with a single timer, then A (without the array) would be best performance (since you wouldn't need attaching). JASS:private struct Data Data next // Any other variable you need. endstruct globals Data first endglobals function Loop takes nothing returns nothing local Data d=first loop exitwhen d==0 // Do stuff with your varaibles. set d=d.next endloop endfunction If you need multiple timers, you need to attach. HSAS/CSData is fastest. |
| 06-24-2008, 12:13 PM | #11 |
If you had really a lot of objects used by the same timer, like 750 or 1000, A would give you a very high fps, the problem is that it is not preemptive , so regardless of the high fps the players will feel like it periodically freezes. Something with attaching will in that case really make the game slower, but the players would actually feel better playing it since at least the game speed is consistent. |
| 06-24-2008, 12:50 PM | #12 | |
@Vexorian: But what if the number of objects is much lower... in the region of <= 100 (that'd be an absolute maximum IMO). Would the periodic freezing be noticeable, or would that vary depending on the player's PC? @Themerion: I know how to do the loop :) Quote:
Anyway, if multiple timers aren't as fast as a single timer, I will just stick to a single timer |
| 06-24-2008, 01:51 PM | #13 | |
Quote:
|
| 06-24-2008, 02:11 PM | #14 |
So, if I was looping through 10 slide instances at any one time, a single timer with a loop would be the best way to go? Or would this be one of those 'do whatever you think is best' kinda things, where the differences are minimal? |
| 06-24-2008, 03:29 PM | #15 | |||||||||||||||||||||||
Quote:
Yeah, HAIL is approximately equal to HSAS. CSData will probably be more common to use though (since it comes bundled with the Caster System). Attachment Systems:
For attaching to units, I think PUI is superior. Quote:
Yup. Quote:
Yup. |
