Author fgregg
Recipients David Su2, fgregg, rhettinger
Date 2018-06-13.14:50:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Is there anything helpful I can do to help close this issue? Maybe convert it into a github PR?

Since Raymond asked for cases where this issue is a problem, I'll add the case that brought me here.

I have an application where I need to do thousands of intersections of multisets. I started with the collections.Counter object, but the current intersection method is too slow. As Counter is a subclass of dict, I thought that I could significantly speed it up by taking advantage of keys intersections.

I've been able to verify that if key intersection was roughly similar in speed to set intersection, than that would be very helpful. However, the   current speed of key intersection does not make that practicable. I can, of course, cast the keys to sets before intersecting, but as David points out that casting is what is taking significant time.

slow dictionary intersection for becoming larger dicts is becoming a problem for me
Date User Action Args
2018-06-13 14:50:45fgreggsetrecipients: + fgregg, rhettinger, David Su2
2018-06-13 14:50:45fgreggsetmessageid: <>
2018-06-13 14:50:45fgregglinkissue27575 messages
2018-06-13 14:50:45fgreggcreate