[Python-Dev] Re: Heap types (PyType_FromSpec) must fully implement the GC protocol

2021年1月12日 11:16:52 -0800

On 2021年1月12日 18:48:39 +0000
Pablo Galindo Salgado <[email protected]> wrote:
> One worry that I have in general with this move
> is the usage of _PyType_GetModuleByDef to get the type object
> from the module definition. This normally involves getting a TLS in every
> instance creation,
> which can impact notably performance for some perf-sensitive types or types
> that are created a lot.
If it's inlined C TLS it should be fast (*). If it's Python's emulated
TLS then probably not :-)
(*) see https://godbolt.org/z/d7eKx7
Regards
Antoine.
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/CKABGMLSJLKDGKUOMXA6MKO36MEWZIIS/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to