Commit 7cf3e2a
committed
Hashtable: Always choose next prime when growing "buckets"
The next prime number for the size of "buckets" may be less than 2 times
the old size. That would cause a skip in the prime number selection,
effectively making the new "buckets" size nearly 4 times the old size
(in constrast with 2 times the old size).
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>1 parent 76806a8 commit 7cf3e2a
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
0 commit comments