Data structure--hash list--performance analysis of hash table

Source: Internet
Author: User
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:

  1. Whether the hash function is uniform
  2. Ways to handle conflicts
  3. 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:

  1. hash lookups and problem sizing don't matter.
  2. string-Appropriate management
  3. 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.
  4. 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:

  1. A hash table is an array that is stored efficiently and then finds
  2. Will generate aggregation

Separation Chain Method:

  1. Hash list is the combination of sequential storage and chained storage, and the storage efficiency and search efficiency of the linked list are low.
  2. Keyword deletion does not require the "lazy Delete" method, which does not store "garbage".
  3. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.