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/2006-May/065022.html below:

[Python-Dev] [Python-checkins] r45925 - in python/trunk: Lib/tempfile.py Lib/test/test_os.py Misc/NEWS Modules/posixmodule.c

[Python-Dev] [Python-checkins] r45925 - in python/trunk: Lib/tempfile.py Lib/test/test_os.py Misc/NEWS Modules/posixmodule.c [Python-Dev] [Python-checkins] r45925 - in python/trunk: Lib/tempfile.py Lib/test/test_os.py Misc/NEWS Modules/posixmodule.c"Martin v. Löwis" martin at v.loewis.de
Tue May 16 07:34:15 CEST 2006
M.-A. Lemburg wrote:
> Well, the strings and integers count twice: once in the module
> namespace and once in the errorcode dictionary.

That shouldn't be the case: the strings are interned (as they
are identifier-like), so you have the very same string object
in both dictionaries.

The numbers shouldn't be duplicated because they occur
in the co_consts array of the global code object, and because
the compiler should share them there.

> Given that the code strings and integers are created
> twice in my version of the module, the numbers sound about
> right.

If they are indeed created twice, something is wrong.

> I agree that creating only one dictionary statically
> and the other mapping dynamically will already be a
> saving of 50% simply by sharing the string and integer
> objects.

No, they should be shared already, so that shouldn't save
anything.

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