This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Mark.Shannon
Recipients Mark.Shannon, methane, rhettinger, serhiy.storchaka
Date 2021-09-22.15:02:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1632322937.18.0.369196659074.issue40116@roundup.psfhosted.org>
In-reply-to
Content
This can be mitigated, if not entirely fixed, by storing an ordering bit vector in the values.

This way all instances of the class SometimesShared in the example above can share the keys.

The keys might be ("optional", "attr")

For any instances with only "attr" as an attibute, the values would be (NULL, value) and the order would be (1,)

The downsides of this approach are:
1. Each values, and thus dict needs an extra 64 bit value.
2. Shared keys have a maximum size of 16.

Overall, I expect the improved sharing to more than compensate for the disadvantages.
History
Date User Action Args
2021-09-22 15:02:17Mark.Shannonsetrecipients: + Mark.Shannon, rhettinger, methane, serhiy.storchaka
2021-09-22 15:02:17Mark.Shannonsetmessageid: <1632322937.18.0.369196659074.issue40116@roundup.psfhosted.org>
2021-09-22 15:02:17Mark.Shannonlinkissue40116 messages
2021-09-22 15:02:17Mark.Shannoncreate