Guido: > It's also quite possible that there are no outside > references to an interned string, but another string with the same > value still references the interned string from its ob_sinterned > field. > > To solve this, we would have to make the ob_sinterned slot count as a > reference to the interned string. But then string_dealloc would be > complicated (it would have to call Py_XDECREF(op->ob_sinterned)), > possibly slowing things down. If the intern table cleanup is being done by a GC pass, you don't need a full Py_XDECREF -- you only need to decrement op->ob_sinterned->ob_refcnt. Doesn't sound excessively expensive to me, but I suppose it would have to be timed to make sure. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+
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