15 Dec
2021
15 Dec
'21
11:55 a.m.
On Wed, Dec 15, 2021 at 2:42 AM Christian Heimes <christian@python.org> wrote:
Would it be possible to write the Py_INCREF() and Py_DECREF() macros in a way that does not depend on branching? For example we could use the highest bit of the ref count as an immutable indicator and do something like
As Antoine pointed out, wouldn't that cause too much cache invalidation between threads, especially for None, True, and False. That's the main reason I abandoned my previous effort (https://github.com/ericsnowcurrently/cpython/pull/9). -eric