Ed Schouten added the comment:

I think that PEP 11 also doesn't rule out changes in this area. For example, 
consider the paragraph starting with the sentence "This policy does not 
disqualify supporting other platforms indirectly. [...]"

Attached is a patch that accomplishes the same with a constant running time for 
operations on keys by using an array. Allocation of new keys runs in expected 
constant time by using a randomised allocation pattern.

If we're not big fans of using randomised access, changing this to a linear 
scan would already be an improvement: keys are only allocated infrequently, but 
hopefully accessed quite often.

----------
Added file: http://bugs.python.org/file44303/key-constant-time.diff

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

Reply via email to