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

[JASS] Curious

Status
Not open for further replies.
Level 12
Joined
Aug 20, 2007
Messages
866
Which one is more efficient:

1. Using Structs
2. Using Handle Vars
3. Using Handle Vars to retrieve a single integer, and using global arrays to keep track of the data
 
Level 6
Joined
Jun 30, 2006
Messages
230
Well, Herman, structs are just global arrays... Structs aren't a handle system. You still need a handle system to transfer the struct from function to function. Using structs and then attaching the struct using Handle Vars is still faster than storing each value independently. However, Handle Vars is slow compared to some newer systems.

I recommend Cohadar's ABC. Pandamine has a system that is faster, but it requires you to do more work, which means more chances for mistakes. For people just starting out, I recommend ABC because it lets you a bit less caught up in details.
 
Level 12
Joined
Aug 20, 2007
Messages
866
Oh

So, #1 is pretty much equal to #3, because you need to attach the struct to a gamecache anyway? (In order to use it in other functions)
 
Level 6
Joined
Jun 30, 2006
Messages
230
Well... you don't HAVE to attach it to a gamecache... You just have to attach it somehow. Cohadar's ABC does not use a gamecache, and it is faster than Kattana's Handle Vars. Padamine's HSAS is even faster (usually), but it takes a bit more work than ABC does.

Using the gamecache is just one method of attaching...
 
Level 12
Joined
Aug 20, 2007
Messages
866
:O

I think I have read about something to do with abusing locations, would that be one way of attaching variables, could you help me make a list of all known ways tp attach, or at least most of them?
 
Status
Not open for further replies.
Top