[Python-ideas] RFC: PEP: Add dict.__version__

Nick Coghlan ncoghlan at gmail.com
Mon Jan 11 22:37:29 EST 2016


On 12 January 2016 at 13:04, Barry Warsaw <barry at python.org> wrote:
> On Jan 09, 2016, at 10:58 AM, Victor Stinner wrote:
>
>>IMHO adding 8 bytes per dict is worth it.
>
> I'm not so sure.  There are already platforms where Python is unfeasible to
> generally use (e.g. some mobile devices) at least in part because of memory
> footprint.  Dicts are used everywhere so think about the kind of impact adding
> 8 bytes to every dict in an application running on such systems will have.

This is another advantage of making this a CPython specific internal
implementation detail - embedded focused variants like MicroPython
won't need to implement it.

The question then becomes "Are we willing to let CPython cede high
memory pressure environments to more specialised Python variants?",
and I think the answer to that is "yes".

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list