This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Mark.Shannon, Yury.Selivanov, eric.snow, methane, rhettinger, serhiy.storchaka, vstinner
Date 2018-04-16.06:14:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1523859267.4.0.682650639539.issue33205@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-04-16 06:14:27serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, vstinner, methane, Yury.Selivanov, Mark.Shannon, eric.snow
2018-04-16 06:14:27serhiy.storchakasetmessageid: <1523859267.4.0.682650639539.issue33205@psf.upfronthosting.co.za>
2018-04-16 06:14:27serhiy.storchakalinkissue33205 messages
2018-04-16 06:14:27serhiy.storchakacreate