• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Table vs hashtable

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
I've seen people saying that you should use Table so that theres only one hashtable to store information.

I've also seen people say to not store so much information to a hashtable because the more information a hashtable has, the slower the lookup times are.

With that logic, wouldn't it be smarter to use multiple hashtables rather than Table? Even though you have multiple hashtables, you have the enhanced speed of the hashtables not having as many keys.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
this hardly hits performance at all, because the lookup is done on underlying level which is much faster than Jass

yes, fullier(is that even word?) hashtable == slower load, but really, this is Jass, if you fear performance drops, use array

I dont think people should be concerned by stuff like this really, mainly because many GUI spells use their own hashtables and also you have a 256 hashtables limit so if you can, you should avoid declaring multiple hashtables
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
only use a hashtable when you are going to have an insane amount of information or are working on a critical system and need as much speed as possible

define "insane" I have a full screen inventory system, talent tree, and speed quest system all running off of Table :eek:
 
Status
Not open for further replies.
Top