>> Agreed, and more importantly, I have yet to be convinced that those NULL >> checks introduce a measurable slowdown. Daniel, have you tried >> measuring the performance difference with only the NULL checks removed? I think it highly unlikely that there is a performance difference. These tend to branch the same way every time, so the processor's branch prediction will tend to reduce the check time to near zero. > I think it would be fine to add a special case for lists (*) and dicts in > PyObject_GetItem(), provided it does make a significant difference in > performance for these two types. -1 The API confusion and clutter isn't worth the micro-optimization. Also, the checks probably do have some value in early detection of programming errors; it would be ashamed to lose them in non-debug builds. When we get bug reports that are due to problems with third-party extensions, it will be harder to know whether the issue is with the extension or with us. Raymond
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4