Performance analysis of a hash table
Average lookup Length (ASL) is used to measure the efficiency of a hash table lookup: Success, unsuccessful.
Success: The found element is inside the hash table
Unsuccessful: The found element is not in the hash table
It is mainly affected by three factors:
- Whether the hash function is uniform
- Ways to handle conflicts
- Reload factor for hash table
Analysis: The effect of different conflict treatment methods and loading factors on efficiency.
The above only reflects the theoretical values of the general case.
The above is also a reaction to the theoretical value of the general situation.
Features of hashing:
- hash lookups and problem sizing don't matter.
- string-Appropriate management
- Hash list, the filling factor is small, the time used is less, therefore, the hash method is a space to change the time of a method.
- The storage of the hash method is random for the storage of the keywords. Not easy to find keywords in order, or for range lookup, or maximum minimum value lookup
Open Address Law:
- A hash table is an array that is stored efficiently and then finds
- Will generate aggregation
Separation Chain Method:
- Hash list is the combination of sequential storage and chained storage, and the storage efficiency and search efficiency of the linked list are low.
- Keyword deletion does not require the "lazy Delete" method, which does not store "garbage".
- Too small α may lead to space waste, large alpha will pay more time, uneven chain table length leads to serious time efficiency underground.
Data structure--hash list--performance analysis of hash table