Cuckoo hashing is a method to resolve collisions in hash tables. It was first introduced by Pagh and Rodler. The basic version of cuckoo hashing uses two hash functions hash1() and hash2(), associated to two separate tables, T1 and T2. Cuckoo hashing guarantees that an entry with key x and value a, denoted as , will be found either in the bucket of index hash1(x) of table T1, or in the bucket of index hash2(x) of table T2. This means that at most two memory locations need to be tested in order to find an entry, which is an improvement compared to possibly dozens of tested locations in the case of basic linear probing. But this comes at a cost. In order to have fast lookups, the insertion process is rearranging entries, which can be very costly.
Cuckoo hashing is a method to resolve collisions in hash tables. It was first introduced by Pagh and Rodler. The basic version of cuckoo hashing uses two hash functions hash1() and hash2(), associated to two separate tables, T1 and T2. Cuckoo hashing guarantees that an entry with key x and value a, denoted as , will be found either in the bucket of index hash1(x) of table T1, or in the bucket of index hash2(x) of table T2. This means that at most two memory locations need to be tested in order to find an entry, which is an improvement compared to possibly dozens of tested locations in the case of basic linear probing. But this comes at a cost. In order to have fast lookups, the insertion process is rearranging entries, which can be very costly.
การแปล กรุณารอสักครู่..
