| | | | | |

Rehash

  • Desired load factor λ = 1.0.
  • Client guesses approximate size on startup, which sets up table with
    1. Prime number of buckets
    2. λ approximately equal to 1.0 (i.e., size = number of buckets)
  • If in the course of use, the size grows more than predicted, performance will slow: call Rehash() to reset the table with more buckets so that the load factor again is approximately 1.

| | Top of Page | 4. Hash Tables and Associative Arrays - 13 of 17