[Python-Dev] cpython: Implement PEP 412: Key-sharing dictionaries (closes #13903)

Kristján Valur Jónsson kristjan at ccpgames.com
Thu Apr 26 13:41:28 CEST 2012

Meanwhile, I blogged about tuning the dict implementation.
Preliminary testing seems to indicate that tuning it to conserve memory saves us 2Mb of wasted slots on the login screen.  No small thing on a PS3 system.
I wonder if we shouldn't make those factors into #defines as I did in my 2.7 modifications, and even provide a "memory saving" predefine for embedders.
(Believe it or not, sometimes python performance is not an issue at all, but memory usage is.)


> -----Original Message-----
> From: Nick Coghlan [mailto:ncoghlan at gmail.com]
> Sent: 24. apríl 2012 11:42
> To: Kristján Valur Jónsson
> Cc: R. David Murray; Antoine Pitrou; python-dev at python.org
> Subject: Re: [Python-Dev] cpython: Implement PEP 412: Key-sharing
> dictionaries (closes #13903)
> On Tue, Apr 24, 2012 at 8:24 PM, Kristján Valur Jónsson
> <kristjan at ccpgames.com> wrote:
> > Perhaps I should write about this on my blog.  Updating the memory
> > allocation macro layer in cPython for embedding is something I'd be
> > inclined to contribute, but it will involve a large amount of
> > bikeshedding, I'm sure :)
> Trawl the tracker before you do - I'm pretty sure there's a patch (from the
> Nokia S60 port, IIRC) that adds a couple of macro definitions so that platform
> ports and embedding applications can intercept malloc() and free() calls.
> It would be way out of date by now, but I seem to recall thinking it looked
> reasonable at a quick glance.
> Cheers,
> Nick.
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-Dev mailing list