PEP 683: "Immortal Objects, Using a Fixed Refcount" (round 4, last call)

@eelizondo @eric.snow
Since the implementation is merged, let’s update the PEP 683 with final performance numbers (for all platforms in 32- and 64-bit modes).

Additionally, could you please update the PEP to reflect that the final implementation uses 0xFFFFFFFF (32 lower bits) in 64-bit mode instead of 2^62 or 2^60 _Py_IMMORTAL_BIT? This affects calculations in the Accidental Immortality section: 16 seconds to immortalize instead of 2,500 days and other sections such as _Py_IMMORTAL_REFCNT.

You could also elaborate the Maintainability section to mention that there are now 3 different ways of working with refcounts (normal, immortal 32-bit and immortal 64-bit) and string interning became more complicated. And I think you meant “it should not have much impact on maintainability” (add not).

Finally, in the last section Reference Counting, with Cyclic Garbage Collection:

  1. This is just generic info about GC. While helpful, it does immediately clear how is it related to immortal objects. I assume the whole reference cycle will not be collected if there is at least one immortal object in it. Could you please add this for clarity?
  2. Fix typo: “before it’s memory is freed” → “before its memory is freed”

I hope you find my suggestions helpful! I can go ahead and create a PR if you’d like my help, but PEP1 recommends to discuss with the author first.