[New-bugs-announce] [issue45340] Lazily create dictionaries for plain Python objects

Mark Shannon report at bugs.python.org
Fri Oct 1 07:21:17 EDT 2021


New submission from Mark Shannon <mark at hotpy.org>:

A "Normal" Python objects is conceptually just a pair of pointers, one to the class, and one to the dictionary.

With shared keys, the dictionary is redundant as it is no more than a pair of pointers, one to the keys and one to the values.

By adding a pointer to the values to the object, or embedding the values in the object, and fetching the keys via the class, we can avoid creating a dictionary for many objects.

See https://github.com/faster-cpython/ideas/issues/72 for more details.

----------
assignee: Mark.Shannon
components: Interpreter Core
messages: 403010
nosy: Mark.Shannon, methane
priority: normal
severity: normal
status: open
title: Lazily create dictionaries for plain Python objects
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45340>
_______________________________________


More information about the New-bugs-announce mailing list