New submission from Serhiy Storchaka:

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.

----------
components: Regular Expressions
files: odict_knownhash.patch
keywords: patch
messages: 253343
nosy: eric.snow, ezio.melotti, mrabarnett, rhettinger, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Avoid repeated hash calculation in C implementation of OrderedDict
type: enhancement
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40838/odict_knownhash.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25462>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to