On 10/21/21 5:01 AM, Henry Fredrick Schreiner wrote:
PEP 649 was about the same as the current performance, but PEP 563 was significantly faster, since it doesn’t instantiate or deal with objects at all, which both the current default and PEP 563 do.
I don't understand what you're saying about how PEP 563 both does and doesn't instantiate objects.
PEP 649, and the current implementation of PEP 563, are definitely both faster than stock behavior when you don't examine annotations; both of these approaches don't "instantiate or deal with objects" unless you examine the annotations. PEP 649 is roughly the same as stock when you do examine annotations. PEP 563 is faster if you only ever examine the annotations as strings, but becomes /enormously/ slower if you examine the annotations as actual Python values.
The way I remember it, most of the negative feedback about PEP 649's performance concerned its memory consumption. I've partially addressed that by always lazy-creating the function object. But, again, I suggest that performance is a distraction at this stage. The important thing is to figure out what semantics we want for the language. We have so many clever people working on CPython, I'm sure this team will make whatever semantics we choose lean and performant.
//arry/
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/XRATIM3V543XVD4U22T45UJ43ZPLTUU2/ Code of Conduct: http://python.org/psf/codeofconduct/