[issue32226] Implement PEP 560: Core support for typing module and generic types

Guido van Rossum report at bugs.python.org
Thu Dec 14 11:23:21 EST 2017


Guido van Rossum <guido at python.org> added the comment:

> This adds an overhead to every indexing.

I'm not doubting your results, but I'm curious how that happened. The extra
code in PyObject_GetItem is right before the point where it would otherwise
raise TypeError -- I presume you benchmark never reached that point. Could
it be that the compiler ends up rearranging the code in a way that is less
optimal for the instruction cache?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32226>
_______________________________________


More information about the Python-bugs-list mailing list