• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] call Vs ExecuteFunc vs EvaluateTrigger

Status
Not open for further replies.
Level 12
Joined
Feb 22, 2010
Messages
1,115
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.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
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?
 
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.
 
Status
Not open for further replies.
Top