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
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