1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  4. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  5. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  6. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  7. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  8. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Solved] call Vs ExecuteFunc vs EvaluateTrigger

Discussion in 'World Editor Help Zone' started by Krogoth, Aug 8, 2013.

  1. Krogoth

    Krogoth

    Joined:
    Apr 5, 2011
    Messages:
    247
    Resources:
    0
    Resources:
    0
    Actual question is: how much difference in speed is between call, ExecuteFunc and EvaluateTrigger (1 condition)?
     
  2. Malhorne

    Malhorne

    Joined:
    Sep 14, 2012
    Messages:
    2,340
    Resources:
    6
    Spells:
    4
    Tutorials:
    1
    JASS:
    1
    Resources:
    6
    Call might be the faster if it's the most use by i can't tell that much about it...
     
  3. Ceday

    Ceday

    Joined:
    Feb 22, 2010
    Messages:
    1,055
    Resources:
    0
    Resources:
    0
    Nice, this thread again.

    There is no way to compare executefunc with other two, it must be slowest since it works with strings, creates another thread, and allows you to use things like TriggerSleepAction.

    Call depends on arguments and return.

    Last time I was around people were using TriggerEvaluate.
     
  4. Malhorne

    Malhorne

    Joined:
    Sep 14, 2012
    Messages:
    2,340
    Resources:
    6
    Spells:
    4
    Tutorials:
    1
    JASS:
    1
    Resources:
    6
    Seriously ?
     
  5. Ceday

    Ceday

    Joined:
    Feb 22, 2010
    Messages:
    1,055
    Resources:
    0
    Resources:
    0
    Just joking

    serious part is, if you can do whatever you need with call(function) why would you create a trigger, a trigger condition and evaluate it?
     
  6. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,427
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    There isn't a fixed answer on how much faster one is than the other (in case you were looking for an answer like: X is 50% faster than Y). There are a lot of factors, and it really depends on how Warcraft 3 handles them.

    A direct call should be the fastest. TriggerEvaluate(trig) would be next in line in that list (speed-wise), but remember that this does have the added memory to store the trigger, its conditions, and conditionfuncs. ExecuteFunc("") would be last. I remember running benchmarks a long time ago and ExecuteFunc() would freeze wc3 if executed too many times at once. ExecuteFunc("") has to look through the entire script (unless warcraft 3 stores the functions in a dictionary/hashtable), so its time may vary. But iirc it is one of the slower options.
     
  7. Krogoth

    Krogoth

    Joined:
    Apr 5, 2011
    Messages:
    247
    Resources:
    0
    Resources:
    0
    Yep :[

    Anyway thanks !