wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 04-04-2009, 05:48 PM   #16
Captain Griffen
Dread Lord of the Cookies
 
Captain Griffen's Avatar


Content Director
 
Join Date: Sep 2003
Posts: 5,368

Submissions (2)

Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)

Approved Map: Warlords[Quicksilver #2] - 1st Place

Default

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).
__________________
Quote:
Originally Posted by Earth-Fury
Griffen is correct, you are not.
Quote:
[13:32] <Akolyt0r> hmm.. stil i want to have some unused women
Captain Griffen is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-04-2009, 06:22 PM   #17
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Quote:
Originally Posted by Tyrande_ma3x
Didn't feel like creating a new thread, sorry for reviving this.
Since he updated the system, he says that it is now the fastest timer system in existence, being ~22% over the speed of Timer Utils Red. I have no idea how it is possible, can someone benchmark and confirm it? It seems like he doesn't want to show his test triggers.
It's very easy to come up with some thing faster than another thing if it is not necessary that the new system actually works and provides the same functionality than the other thing... Key Timers are still broken in the sense they don't work. Though I guess the world is crazy enough that people would prefer speed over actual functionality... But really, if you want speed and something as non-flexible as this, then you can already do the typical struct loop method, this time with a bigger time out, that is equivalent to this thing, much faster because there is no overhead, simpler code, and it is as broken as key timers, but will use much less code...

The benchmarking is not believable as both things work radically different, comparisons in percentage don't make a lot of sense.

Quote:
Due to a neat little And( ) boolexpr creation usage
He could just have used two Trigger Conditions, sounds silly of an improvement anyway, if this really improves speed by that big of a percentage it means what people have feared to accept since ages ago - That timer systems were fast enough already.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 04-04-2009, 08:46 PM
Litany
This message has been deleted by Litany.
Old 04-04-2009, 09:31 PM   #18
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

Send a message via AIM to emjlr3 Send a message via MSN to emjlr3
Default

its no less accurate than a loop - and far easier to use (generalizing this from usage of TT, not actual KT use)
__________________
emjlr3 is offline   Reply With Quote
Old 04-04-2009, 09:39 PM   #19
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

it's as inaccurate as a loop, just slower, if the point for using something inaccurate is speed, then go with the fastest one...
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 04-04-2009, 09:47 PM   #20
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

Quote:
Originally Posted by Vexorian
For example, what if blizz releases a SetHandleUserData native?

I presume nothing would change. Implementations are irrelevant anyways.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 04-04-2009, 09:50 PM   #21
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

... that was mostly the point.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 04-04-2009, 11:22 PM
Litany
This message has been deleted by Litany.
Old 04-06-2009, 01:18 PM   #22
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

Send a message via AIM to emjlr3 Send a message via MSN to emjlr3
Default

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:
Easy isn't easy when it sacrifices flexibility and functionality that has to be made up elsewhere. That's retard logic.

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.
emjlr3 is offline   Reply With Quote
Old 04-06-2009, 02:20 PM   #23
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Quote:
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)
In order to make all those TriggerEvaluates faster than no TriggerEvaluates at all, you would need a lot of instances, even then though overall processor time used would be shorter, it is yet to know whether the non-preemptiveness will make players perceive some some 'LAG' as in periodic frame freezes. When I tested in this computer, using a single timer for 1000 instances seemed worse than using 1000 timers for 1000 instances, the later had worse overal fps, but the low fps was constant, the former had a lot of fps variability, making it very annoying on the eye.

Quote:
, is that all inaccuracy is the same, as such, the system is very precise; a loop suffers from both inaccuracy and lack of precision
Please explain.

--
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:

Collapse 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

__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 04-06-2009, 02:54 PM   #24
FriendlyPsycho
User
 
FriendlyPsycho's Avatar
 
Join Date: Feb 2009
Posts: 109

Submissions (1)

FriendlyPsycho is on a distinguished road (12)

Default

Quote:
Originally Posted by Vexorian
however I am using a jasshelper version from the future

I hope the compile error issues are fix'd

module and implement look like very interesting features mmhhmmnn.
__________________
" YOU RAGE, YOU LOSE! "
FriendlyPsycho is offline   Reply With Quote
Old 04-06-2009, 04:03 PM   #25
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,153

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

implement textmacro cheat ?! LOL ^^
whats "module" for ?
__________________
akolyt0r is offline   Reply With Quote
Old 04-06-2009, 04:17 PM   #26
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

Send a message via AIM to emjlr3 Send a message via MSN to emjlr3
Default

Quote:
single timer for 1000 instances seemed worse than using 1000 timers for 1000 instances

that is interesting - would you rather have a constant 40fps, or a constantly changing 40-45....

Quote:
Please explain.

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.
emjlr3 is offline   Reply With Quote
Old 04-06-2009, 04:29 PM   #27
FriendlyPsycho
User
 
FriendlyPsycho's Avatar
 
Join Date: Feb 2009
Posts: 109

Submissions (1)

FriendlyPsycho is on a distinguished road (12)

Default

Quote:
Originally Posted by emjlr3
that is interesting - would you rather have a constant 40fps, or a constantly changing 40-45....

Actually, a constant fps is better. The latter is very very annoying and that makes it worse.
__________________
" YOU RAGE, YOU LOSE! "
FriendlyPsycho is offline   Reply With Quote
Old 04-06-2009, 05:26 PM
Litany
This message has been deleted by Litany.
Old 04-06-2009, 05:55 PM   #28
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

Send a message via AIM to emjlr3 Send a message via MSN to emjlr3
Default

you can really see a difference between .025 and .04 in game?

wow
__________________
emjlr3 is offline   Reply With Quote
Old 04-06-2009, 06:02 PM   #29
Tyrande_ma3x
User
 
Tyrande_ma3x's Avatar
 
Join Date: Feb 2009
Posts: 185

Submissions (1)

Tyrande_ma3x is on a distinguished road (12)

Default

> 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.
Tyrande_ma3x is offline   Reply With Quote
Old 04-06-2009, 07:11 PM
Litany
This message has been deleted by Litany.
Old 04-06-2009, 07:14 PM   #30
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,726

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Yeah, I can't see the difference between 0.05 and 0.025 on my computer.
__________________
Home Page
DoE v1.14c Download
AotZ v2.03d Download
OD v0.10x Download

Coming soon eventually...

Personal To-Do List:
ICARUS
Aot3

WC3C Chat
Chat IP: 66.103.20.109
Earthbound 2 in English
vJass Manual

"DAMAGE_TYPE_POISON motherfucker!" ~Anitarf
Rising_Dusk is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 01:51 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services