This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author orenti
Recipients
Date 2002-08-15.17:45:17
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=562624

The code size increase is not surprising - all names appear 
twice in the executable: once as C strings and again as 
static PyStringObjects. This duplication can be eliminated.

I'm surprised that there is *any* speed increase because I 
barely changed any code to make use this. This is very 
encouraging.

The localization and forced recomplication issues you raise 
are not really relevant because this MUST NOT be used for 
anything but builtin names and builtins are not added so 
frequently. Even standard modules should not declare static 
names.

The interning of static strings must be done before the 
interpreter is initialized to ensure that the static name is the 
interned name. If you intern a static name after the same 
name has already been interned elsewhere the static object 
will not be the one true interned version and static references 
to it will be incorrect.

Actually, the macro PyNAME is not required any more and 
the actual symbol name can be used. I used the macro to do 
typecasting but it's no longer necessary because I found a 
way to make the static names real PyObjects (probably the 
only place where something is actually defined as a 
PyObject!)
History
Date User Action Args
2007-08-23 15:14:40adminlinkissue593627 messages
2007-08-23 15:14:40admincreate