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 rhettinger
Recipients methane, rhettinger, serhiy.storchaka, tim.peters, vstinner
Date 2018-01-13.20:14:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1515874483.25.0.467229070634.issue29476@psf.upfronthosting.co.za>
In-reply-to
Content
What I've decided for now is to keep the freeslot reuse logic but in a simpler form. Currently there are two optimizations for rare cases.  The first is reusing a dummy entry -- we'll keep that.  And the second is detecting multiple dummies in a lookup chain and prefering the first in the chain -- I'm going to get rid of this I haven't found any plausible case where it demonstrates value in excess of its cost.

For it to trigger, the set has to have had a growth phase, then a number of subsequent deletions, and then later additions that have multiple collisions with dummy entries, all without any intervening resizes.  Modern sets have a lower fill factor, making this situation even less likely.  Also, modern sets use a series of linear probes making collisions much cheaper.  The benefit is so small and so rare, it possible that the cost of the inner-loop test now exceeds its potential benefit.  Given that the optimization is of questionable worth, I choose to remove it, preferring the simpler inner-loop code.
History
Date User Action Args
2018-01-13 20:14:43rhettingersetrecipients: + rhettinger, tim.peters, vstinner, methane, serhiy.storchaka
2018-01-13 20:14:43rhettingersetmessageid: <1515874483.25.0.467229070634.issue29476@psf.upfronthosting.co.za>
2018-01-13 20:14:43rhettingerlinkissue29476 messages
2018-01-13 20:14:42rhettingercreate