Message85824
In the depths of dictobject.c one can see that dict_setdefault uses two
identical calls to PyObject_Hash and ma_lookup. The first to see if the
item is in the dict, the second (only if key is not present) to add the
item to the dict.
This second lookup (and hash) are not needed and can be avoided by
inlining a portion of PyDict_SetItem instead of calling the entire
subroutine. |
|
Date |
User |
Action |
Args |
2009-04-09 19:35:30 | dschult | set | recipients:
+ dschult |
2009-04-09 19:35:30 | dschult | set | messageid: <1239305730.8.0.484085764135.issue5730@psf.upfronthosting.co.za> |
2009-04-09 19:35:29 | dschult | link | issue5730 messages |
2009-04-09 19:35:29 | dschult | create | |
|