Make intern! & py_format! strings immortal#5794
Make intern! & py_format! strings immortal#5794bschoenmaeckers wants to merge 3 commits intoPyO3:mainfrom
intern! & py_format! strings immortal#5794Conversation
4c170c3 to
c244ede
Compare
|
If you're interested in making things immortal, Python 3.15 will have There's also a backport we can adapt for Python 3.13 and 3.14: python/pythoncapi-compat#164 |
The following docs suggest that you should not use it on strings. |
|
Sorry, I wasn't trying to say it would be useful here, just as a more general comment. |
c244ede to
d5979a8
Compare
d5979a8 to
bb3f570
Compare
|
Not sure if this has any positive effect on performance. |
|
In my experience refcount churn isn't usually a big performance cost. The exception is if an object is shared on the free-threaded build, because inrefs and decrefs on shared objects are substantially more expensive than unshared objects. |
No description provided.