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 serhiy.storchaka
Recipients jcea, loewis, rhettinger, serhiy.storchaka
Date 2012-11-27.20:10:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354047028.07.0.69492945626.issue16562@psf.upfronthosting.co.za>
In-reply-to
Content
And here is a synthetic microbenchmark:

$ ./python -m timeit -s "n=10**3; k=2; a={(i,)*k:i for i in range(n)}; b={(i,)*k:i for i in range(n)}"  "a == b"

Vanilla: 251 usec per loop
Patched: 195 usec per loop

$ ./python -m timeit -s "n=10**3; k=2; a={(i,)*k:i for i in range(n)}; b=dict(a)"  "a == b"

Vanilla: 116 usec per loop
Patched: 58.6 usec per loop

The use of tuple keys is quite common.
History
Date User Action Args
2012-11-27 20:10:28serhiy.storchakasetrecipients: + serhiy.storchaka, loewis, rhettinger, jcea
2012-11-27 20:10:28serhiy.storchakasetmessageid: <1354047028.07.0.69492945626.issue16562@psf.upfronthosting.co.za>
2012-11-27 20:10:28serhiy.storchakalinkissue16562 messages
2012-11-27 20:10:27serhiy.storchakacreate