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 xiang.zhang
Recipients methane, rhettinger, serhiy.storchaka, vstinner, xiang.zhang
Date 2016-10-29.06:14:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
If you inline insert_index, dictresize3 is not that bad.

./python3 -m perf timeit -s 'x = list(range(1000))' -- 'dict.fromkeys(x)'
dictresize3: Median +- std dev: 43.9 us +- 0.7 us
dictresize3(insert_index inlined): Median +- std dev: 41.6 us +- 0.6 us
dictresize4: Median +- std dev: 41.7 us +- 1.2 us

But don't bother on microbenchmark, just move on. I just think the logic is not as clear as dictresize3. But the easiness for future modification makes sense.
Date User Action Args
2016-10-29 06:14:00xiang.zhangsetrecipients: + xiang.zhang, rhettinger, vstinner, methane, serhiy.storchaka
2016-10-29 06:14:00xiang.zhangsetmessageid: <>
2016-10-29 06:14:00xiang.zhanglinkissue28199 messages
2016-10-29 06:14:00xiang.zhangcreate