Message40908
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!)
|
|
Date |
User |
Action |
Args |
2007-08-23 15:14:40 | admin | link | issue593627 messages |
2007-08-23 15:14:40 | admin | create | |
|