A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-April/119012.html below:

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

[Python-Dev] cpython: Implement PEP 412: Key-sharing dictionaries (closes #13903) [Python-Dev] cpython: Implement PEP 412: Key-sharing dictionaries (closes #13903)martin at v.loewis.de martin at v.loewis.de
Tue Apr 24 19:43:30 CEST 2012
> Benchmarks should measure memory usage too, of course.  Sadly that  
> is not possible in standard cPython.

It's actually very easy in standard CPython, using sys.getsizeof.

> Btw, this is of great interest to me at the moment, our Shanghai  
> engineers are screaming at the
> memory waste incurred by dictionaries.  A 10 item dictionary  
> consumes 1/2k on 32 bits, did you know this?

I did.

In Python 3.3, this now goes down to 248 bytes (32 bits).

Regards,
Martin


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4