• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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