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 pitrou
Recipients alexandre.vassalotti, neologix, pitrou, serhiy.storchaka, tim.peters, vstinner
Date 2014-05-23.08:43:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1400834622.06.0.445075686891.issue21556@psf.upfronthosting.co.za>
In-reply-to
Content
> I'm saying attempt, because although it works correctly, some benchmarks are actually slower.
> I didn't profile it, so I don't know if it's due to the hashtable implementation, function call overheads, etc.

It probably shows that Python dicts (which the pickle hashtable is a rip-off of, module refcounting) are more optimized than the average hash table implementation :-)

But also, _Py_hashtable_hash_ptr is quite crude in that it doesn't even try to compensate for pointer alignment, so there will automatically be many collisions. Only one hash bucket every 8 or 16 will be used, at best.

And the straightforward collision resolution in hashtable.c is much less efficient at mitigating collisions than a Python dict's.
History
Date User Action Args
2014-05-23 08:43:42pitrousetrecipients: + pitrou, tim.peters, vstinner, alexandre.vassalotti, neologix, serhiy.storchaka
2014-05-23 08:43:42pitrousetmessageid: <1400834622.06.0.445075686891.issue21556@psf.upfronthosting.co.za>
2014-05-23 08:43:42pitroulinkissue21556 messages
2014-05-23 08:43:40pitroucreate