请输入您要查询的字词:

 

单词 GoodHashTablePrimes
释义

good hash table primes


In the course of designing a good hashing configurationMathworldPlanetmathPlanetmath, it is helpful to have a list of prime numbers for the hash table size.

The following is such a list. It has the properties that:

  1. 1.

    each number in the list is prime

  2. 2.

    each number is slightly less than twice the size of the previous

  3. 3.

    each number is as far as possible from the nearest two powers of two

Using primes for hash tables is a good idea because it minimizes clustering in the hashed table. Item (2) is nice because it is convenient for growing a hash table in the face of expanding data. Item (3) has, allegedly, been shown to yield especially good results in practice.

And here is the list:

The columns are, in order, the lower bounding power of two, the upper bounding power of two, the relative deviation (in percent) of the prime numberMathworldPlanetmath from the optimal middle of the first two, and finally the prime itself.

Happy hashing!

随便看

 

数学辞典收录了18232条数学词条,基本涵盖了常用数学知识及数学英语单词词组的翻译及用法,是数学学习的有利工具。

 

Copyright © 2000-2023 Newdu.com.com All Rights Reserved
更新时间:2025/5/4 1:38:16