[Python-Dev] PyDict_SetItem hook
lists at cheimes.de
Thu Apr 2 03:23:41 CEST 2009
John Ehresman wrote:
> * To what extent should non-debugger code use the hook? At one end of
> the spectrum, the hook could be made readily available for non-debug use
> and at the other end, it could be documented as being debug only,
> disabled in python -O, & not exposed in the stdlib to python code.
To explain Collin's mail:
Python's dict implementation is crucial to the performance of any Python
program. Modules, types, instances all rely on the speed of Python's
dict type because most of them use a dict to store their name space.
Even the smallest change to the C code may lead to a severe performance
penalty. This is especially true for set and get operations.
More information about the Python-Dev