Message253343
There are private _PyDict_*_KnownHash functions that allow to avoid repeated hash calculation in complex operations with a dict. Proposed patch makes C implementation of OrderedDict to use these functions. It is not just an optimization, it makes some OrderedDict methods atomic (or almost atomic), that decreases a chance to desynchronize the linked list with the dict. That is why I suggest to commit the patch in 3.5. | |
Date | User | Action | Args | 2015-10-22 18:15:07 | serhiy.storchaka | set | recipients: + serhiy.storchaka, rhettinger, ezio.melotti, mrabarnett, eric.snow | 2015-10-22 18:15:07 | serhiy.storchaka | set | messageid: <1445537707.4.0.965290035462.issue25462@psf.upfronthosting.co.za> | 2015-10-22 18:15:07 | serhiy.storchaka | link | issue25462 messages | 2015-10-22 18:15:07 | serhiy.storchaka | create | | |