Performance issue using globals ?

C

Chindril

Guest
Hi, this is a quick question about performance when using globals. Let's say you are using a LOT of globals (say, 10000+) in JASS (inside a globals / endglobals) tag. Would there be any slow down or not ? I presume there won't be, but I want to be sure.

The only issue I see would be if you fill the physical memory of the machine that runs the game, then it would slow down a lot (and crash eventually), but you would need an impossible number of variables for that to happen.

Otherwise, is there any drawbacks ? If yes, are they related to a type of globals (say handles), or all of them ?

Thanks

- Chindril
 

Vexorian

Why no custom sig?
Reaction score
187
The only issue I see would be if you fill the physical memory of the machine that runs the game, then it would slow down a lot (and crash eventually), but you would need an impossible number of variables for that to happen.


Bold parts aren't that quite true.

You know, more than memory there's the problem with the names hash, pipe says the names hash table begins getting slower after 512 variables. which is not that small. But at the end of the day, when globals are necessary they are the best alternative.
 
C

Chindril

Guest
Thanks Vexorian, I was seeing variables in JASS like in any other language, just a pointer to a memory space. I didn't knew it was working with a hash table to look-up the variables.

Thanks for the answer.

- Chindril
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top