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 josh.r
Recipients josh.r, lebedov, pitrou, rhettinger, serhiy.storchaka, vstinner
Date 2014-05-16.01:01:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1400202090.74.0.0174382140536.issue21507@psf.upfronthosting.co.za>
In-reply-to
Content
Not sure how much that really helps. If I understand you correctly, it would be a memory optimization that would require a round of rehashing to use?

If you wanted to make a change that got "guaranteed" better performance, you might add support for dict's dict_keys and dict_items objects (since those have the same uniqueness guarantees as a set or dict, and I could easily see someone creating sets from them to remove the link to the original dict).

If you wanted to get crazy, you might add preallocation support for collections.abc abstract classes equivalent to the built-ins, specifically, Set, Mapping, KeysView and ItemsView. That's probably not a good idea though, since it ends up calling out to Python code more (slowing you down for the general case) and it's probably not as safe, since a user-defined implementation of those abstract classes might not strictly adhere to the same uniqueness or hashability contracts the built-ins provide.
History
Date User Action Args
2014-05-16 01:01:30josh.rsetrecipients: + josh.r, rhettinger, pitrou, vstinner, serhiy.storchaka, lebedov
2014-05-16 01:01:30josh.rsetmessageid: <1400202090.74.0.0174382140536.issue21507@psf.upfronthosting.co.za>
2014-05-16 01:01:30josh.rlinkissue21507 messages
2014-05-16 01:01:28josh.rcreate