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

Hashtable vs Hashtables

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
so using one hashtable per spell/system is more efficient.
Do you know the point where it reaches "There is enough uses of this Hashtable, let's make a new Hashtable" ?

I need to know this for large-scale uses of the Hashtable.

It would go to waste to use 1 Hashtable per spell, seriously, in a large-scale map RPG, or something (even AoS).
 
Level 12
Joined
May 22, 2015
Messages
1,051
Maybe around 200-500 handles, only then we need a new Hashtable (this is just a rough estimation tho).

That is very few, I think. A hashtable can store that without any problems.

I have around 5 or 6 hashtables in my map, though I think there is still at least 1 that can be removed in favour of an array using unit indexes.
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
Hashtables are fine to use only one for everything in your map or have 255 that all work cooperatively to store all the data you need.

I presonally think you shouldnt care that much.
But as long as you do not need a hashtable, you should use normal arrays.

There are a total of more than one trillion slots in hashtables so you can store more data than even your Hard Drive supports.
I am talking about 16 Zebibytes of data... (16,384 Exabytes or 16,777,216 Petabytes or 17,179,869,184 Terabytes)
That not even using handles but only primitive types.

If you only need one row of a hashtable, you can use Table instead.
But if you only need one row, you can probably do it without a hashtable.
 
Last edited:
Status
Not open for further replies.
Top