
Inada Naoki schrieb am 08.02.22 um 06:15:
On Tue, Feb 8, 2022 at 1:47 PM Guido van Rossum wrote:
Thanks for trying it! I'm curious why it would be slower (perhaps less locality? perhaps the ...Id... APIs have some other trick up their sleeve?) but since it's also messier and less backwards compatible than just leaving _Py_IDENTIFIER alone and just not using it, I'd say let's not spend more time on that alternative and just focus on the two other horses still in the race: immortal objects or what you have now.
I think it's because statically allocated strings are not interned.
That would explain such a difference.
I think deepfreeze should stop using statically allocated strings for interned strings too.
… or consider the statically allocated strings the interned string value. Unless another one already exists, but that shouldn't be the case for CPython internal strings. Stefan