I am not sure if this is implemented yet, but, if refcounts are expensive, it could be worthwhile to mark some values as not refcounted at all - Python interpreter doesn't exist without None, True, False, integers -5 ... 256, empty tuple, empty Unicode.... so it doesn't make sense to count references to these at all - there are not even many real uses in threading environments for tracking the number of references to these singleton objects.
I am not sure if this is implemented yet, but, if refcounts are expensive, it could be worthwhile to mark some values as not refcounted at all - Python interpreter doesn't exist without
None
,True
,False
, integers -5 ... 256, empty tuple, empty Unicode.... so it doesn't make sense to count references to these at all - there are not even many real uses in threading environments for tracking the number of references to these singleton objects.