• 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] Question: Indexing or Hashtable?

Status
Not open for further replies.
Level 20
Joined
Aug 13, 2013
Messages
1,696
I have a question for making my spell MUI . I've been search to the website how to make the spell MUI. Some of them are Index and Hashtable Tutorials. I'm learned much from them and it makes my spell MUI 100% BUT I have a question what is the faster and efficient to make a spell MUI, Is it Indexing or Hashtable??????.
 
For making spells, My suggestion would be Indexing, because you are iterating over instances so you need a much faster iteration.

For systems, use Hashtables, though for only complex systems such as that has registration. Indexing for majority.

Why use Indexing?
- It has 0 function calls(excluding some value calls, e.g. GetUnitPropWindow, GetWidgetLife, etc.)
- Because of the case above, it has a much better speed.

Why use Hashtables?
- It has 2D array
- It has an index size of 2147483648 keys.(Total of 2147483648^2)
- It allows you not to iterate over indexes just to find a certain value.
- It is large.

Why not use Indexing?
- Not for value retrieval, like retrieving a certain index checking for the type check.
- Annoys you to create lot of variable arrays

Why not use Hashtables?
- They are slow.
- You can only have 255 hashtables.


So which will you choose? It is up to you :D
 
Status
Not open for further replies.
Top