• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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