New submission from Raymond Hettinger:

Once http://bugs.python.org/issue18835 is resolved, I would like to see the 
various set optimizations applied to dictionaries as well:

* Move the key before the hash in the dict struct (the key is accessed more 
frequently in the code and being in the first struct position allows it to be 
looked-up without a struct offset).

* Don't INCREF and DECREF dummy objects.  Only one reference needs to be held.  
See http://bugs.python.org/issue18797

* Reduce the cost of hash collisions by inspecting nearby dict entries for 
matches prior to moving on to other probes elsewhere in memory.  See 
http://bugs.python.org/issue18771

* Make the previous improvement more effective by using aligned memory 
allocations for the dict tables.  See http://bugs.python.org/issue18835

Collectively, these optimizations can substantially improve dictionary 
performance.

----------
components: Interpreter Core
messages: 196706
nosy: haypo, pitrou, rhettinger, tim.peters
priority: low
severity: normal
status: open
title: Apply the setobject optimizations to dictionaries
type: performance
versions: Python 3.4

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

Reply via email to