|
|
#16 |
|
Dread Lord of the Cookies
Content Director
|
Due to a neat little And( ) boolexpr creation usage, assuming that they are programmed properly in terms of performance (not at all clear), then in normal use it should be faster than RT slightly, making it over 20% faster than TT, and considerably faster than TU (exact benchmarking between them is impossible).
__________________Note that this applies when using only one timeout. When using multiple time outs it'll be slightly slower for each extra one by the summation of (cost of timer expiring / discrete timeout value). |
|
|
|
| Sponsored Links - Login to hide this ad! |
|
|
|
|
#17 | ||
|
Free Software Terrorist
Technical Director
|
Quote:
The benchmarking is not believable as both things work radically different, comparisons in percentage don't make a lot of sense. Quote:
|
||
|
|
|
|
|
#18 |
|
Rehabbing
|
its no less accurate than a loop - and far easier to use (generalizing this from usage of TT, not actual KT use)
__________________ |
|
|
|
|
|
#19 |
|
Free Software Terrorist
Technical Director
|
it's as inaccurate as a loop, just slower, if the point for using something inaccurate is speed, then go with the fastest one...
__________________ |
|
|
|
|
|
#20 | |
|
master of fugue
Join Date: Jun 2007
Posts: 2,558
![]() ![]() ![]() ![]()
|
Quote:
I presume nothing would change. Implementations are irrelevant anyways. |
|
|
|
|
|
|
#21 |
|
Free Software Terrorist
Technical Director
|
... that was mostly the point.
__________________ |
|
|
|
|
|
#22 | |
|
Rehabbing
|
Difference being that eventually, a system like TT, would become faster then a loop, after you have a few timers firing simultaneously (or so Cohadar claims)
__________________Where TT shines (and I use this term loosely), is that all inaccuracy is the same, as such, the system is very precise; a loop suffers from both inaccuracy and lack of precision (not that it really matters at the timer intervals that require max efficiency) Quote:
I fail to see your logic TT_Start and TT_GetData are far easier for me to use, especially when I have multiple structs for the same spell that I would have otherwise needed to loop through seperately, using an array and index for each (not to mention updating the stack, etc.) - I assume KT works similarly there is no loss of functionality - and if by flexibility you mean timer speed, well, .04 works fine for anything periodic which requires an efficient attachment engine and I am by no means an "efficiency clown" - I employ whats easiest and fastest to use, and gets the job done in the fashion desired Last edited by emjlr3 : 04-06-2009 at 01:31 PM. |
|
|
|
|
|
|
#23 | ||
|
Free Software Terrorist
Technical Director
|
Quote:
Quote:
-- So I just coded the fastest timer system on earth, (provided it is for people that are too lazy to write loops and the interval is constant and very short), however I am using a jasshelper version from the future: JASS://Syntax is subject to change module TimerLoop private static thisstruct array V private static integer N = 0 private static timer T = CreateTimer() static method doLoop takes nothing returns nothing local integer i = 0 loop exitwhen i==.N if( not V[i].loopAction() ) then call V[i].destroy() set .N=.N-1 set V[i]=V[.N] else set i=i+1 endif endloop if (.N==0) then call TimerStop(.T) endif endmethod method addToLoop takes nothing returns nothing if (.N == 0) then call TimerStart(.T , 0.02, true, function thisstruct.doLoop ) endif set .V[.N] = this set .N = .N + 1 endmethod endmodule struct test unit u integer c method loopAction takes nothing returns boolean if ( GetUnitAbilityLevel(this.u, 'B001') < 1) then call KillUnit(this.u) return false endif set this.c = this.c -1 if (this.c == 0) then return false endif return true endmethod implement TimerLoop static method create takes unit u, integer c returns nothing local test t = test.create() set t.u = u set t.c = c call t.addToLoop() return t endmethod endstruct // No trigger evaluate was used when compiling this struct |
||
|
|
|
|
|
#24 | |
|
User
Join Date: Feb 2009
Posts: 109
|
Quote:
I hope the compile error issues are fix'd ![]() module and implement look like very interesting features mmhhmmnn. |
|
|
|
|
|
|
#25 |
|
In Flames
Join Date: Jan 2006
Posts: 1,153
|
implement textmacro cheat ?! LOL ^^
__________________whats "module" for ? |
|
|
|
|
|
#26 | ||
|
Rehabbing
|
Quote:
that is interesting - would you rather have a constant 40fps, or a constantly changing 40-45.... Quote:
it was incorrect (both methods have mutually shitty precision and accuracy) - please disregard btw what is TimerStop ? Last edited by emjlr3 : 04-06-2009 at 04:21 PM. |
||
|
|
|
|
|
#27 | |
|
User
Join Date: Feb 2009
Posts: 109
|
Quote:
Actually, a constant fps is better. The latter is very very annoying and that makes it worse. |
|
|
|
|
|
|
#28 |
|
Rehabbing
|
you can really see a difference between .025 and .04 in game?
__________________wow |
|
|
|
|
|
#29 |
|
User
Join Date: Feb 2009
Posts: 185
|
> you can really see a difference between .025 and .04 in game?
So can I... 0.04 is a crappy period, I prefer 0.03125. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
|
Donate |