• 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.

[Trigger] OP Limit (question)

Status
Not open for further replies.
Level 12
Joined
Mar 17, 2007
Messages
412
I've searched around I cannot find a informative answer nor have I found anything that is detailed enough to specify what this is exactly, is 1 integer (loop) adding a +1 to the operation? What exactly is adding to the operation I'm blind here.

If a thread can with stand 33,333 or 25,000? I question this because my loops don't nearly even hit 100 even though I'm running a sequence of about 5 Integer loops of them so we then have a total of 500 loops. Am I missing something, why does it stop at only 500?
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
300k micro ops, every little instruction costs something. There was a price list somewhere but I do not find it anymore. Iirc, most stuff was like 4, but that really means every little thing like reading a variable, writing to it, arithmetics, control structures like the start/end of a loop, comparisons, returning, function calls etc. That adds up and since function calls can be nested and the execution may vary (e.g. with ifs you can go different branches), there is not a good way to determine the burden of a function at compile time.

But yeah, you should separate what does not belong together anyway, open a new thread for functions you know may be expensive and avoid algorithms with a high amount of iterations not only because of the op limit but general performance.

http://www.wc3c.net/showthread.php?p=1076343
 
Last edited:
Status
Not open for further replies.
Top