Message315351
The capacity of the dict is 2/3 of its hashtable size: dk_usable < 2/3 * dk_size.
Currently the dict grows if dk_usable > 1/4 * dk_size, and preserves the size if dk_usable < 1/4 * dk_size. Note that it it can grow twice if dk_usable > 1/2 * dk_size.
With the proposed change the dict will grow only if dk_usable > 1/3 * dk_size, preserve the size if 1/6 * dk_size < dk_usable < 1/3 * dk_size, and shrink if dk_usable < 1/6 * dk_size. After growing once it will no need to grow again until the number of item be increased.
This LGTM. |
|
Date |
User |
Action |
Args |
2018-04-16 06:14:27 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, vstinner, methane, Yury.Selivanov, Mark.Shannon, eric.snow |
2018-04-16 06:14:27 | serhiy.storchaka | set | messageid: <1523859267.4.0.682650639539.issue33205@psf.upfronthosting.co.za> |
2018-04-16 06:14:27 | serhiy.storchaka | link | issue33205 messages |
2018-04-16 06:14:27 | serhiy.storchaka | create | |
|