> I think the idea is more that you could skip the 'Py_INCREF(Py_None)', > which is a fairly common prelude to 'return Py_None'. You'd set their > refcounts to the maximum possible value, and the deallocation function > would simply reset the refcount to maximum again. > > I'm not sure, however, that this would be common enough to be helpful. It > seems to me Py_INCREF should effectively translate to only a single machine > instruction or two. I mean, it's just incrementing an integer whose > address is known at compile time. I vaguely recall that this was proposed and perhaps even tried before, and not found to make a difference. --Guido van Rossum (home page: http://www.python.org/~guido/)
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