[Python-Dev] Store startup modules as C structures for 20%+ startup speed improvement?
stefan_ml at behnel.de
Fri Sep 21 14:36:37 EDT 2018
Guido van Rossum schrieb am 21.09.2018 um 19:35:
> Though now I start worrying about interned strings. That's a concept that's
> a little closer to being a feature.
True. While there's the general '"ab"+"cd" is (not) "abcd"' caveat, I'm
sure quite a bit of code out there assumes that parsed identifiers in a
module, such as the names of functions and classes, are interned, since
this was often communicated. And in fact, explicitly interning the same
name might return a different string object with this change than what's in
the module/class dict.
More information about the Python-Dev