New submission from Mark Shannon <m...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue45340>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to