Message253343
| Author |
serhiy.storchaka |
| Recipients |
eric.snow, ezio.melotti, mrabarnett, rhettinger, serhiy.storchaka |
| Date |
2015年10月22日.18:15:06 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1445537707.4.0.965290035462.issue25462@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|