Nick Coghlan wrote: >> Many of the routines in abstract.c check their parameters for NULL, as a >> sanity check, and throw a SystemError if NULL is detected. I'm tempted >> to suggest making these checks only when Py_DEBUG is defined, but I >> suspect if you wanted it that way, you would have changed it already. ;) >> >> Assuming you really want the NULL checks in production Python, there are >> 5 checks for NULL even though there are only two parameters. Seems like >> overkill? > > The main problem is that many of these methods are not only used > internally, but are *also* part of the public C API made available to > extension modules. We want misuse of the latter to trigger exceptions, > not segfault the interpreter. 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?
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