[Freeciv-Dev] Hash tables
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Well, i don't want anyone to think that i'm spamming the freeciv-dev list
but... :)
Here is another problem with the hash tables...
Colisions aren't solved.
Usually an hash table is like this:
Buckets
----
| |
---- ----
| |----->| |
---- ----
| |
---- ---- ----
| |----->| |---->| |
---- ---- ----
| |
----
i.e. each bucket contains a list of nodes.
In the current implementation, each bucket can contain only one node.
So if there is a colision, we have a big problem.
Also, the size of an hash table (number of buckets) should be a prime
number to reduce the number of colisions.
---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa
- [Freeciv-Dev] Hash tables,
Vasco Alexandre Da Silva Costa <=
|
|