This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author corona10
Recipients corona10, gvanrossum, vstinner
Date 2020-04-23.02:48:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587610134.42.0.272743433509.issue40369@roundup.psfhosted.org>
In-reply-to
Content
Since PEP 560 was approved,
The following syntax has become available. 

from queue import Queue
v = Queue[int]

It's a very shiny feature.
Given the direction of programming language, it's probably a very useful feature that users will use very often in the near future.

When I looked at Object/geneticiasobject.c, the current implementation is a very good condition for using the vectorcall proposed by PEP590 .

The benchmarks are as follows.
So I suggest using vectorcall in GenericAlias.

if the suggestion is accepted, I 'd like to summit the patch :)


+--------------------+----------------------+-----------------------------+
| Benchmark          | master-generic-alias | proposed-generic-alias      |
+====================+======================+=============================+
| bench GenericAlias | 143 ns               | 111 ns: 1.29x faster (-22%) |
+--------------------+----------------------+-----------------------------+
History
Date User Action Args
2020-04-23 02:48:54corona10setrecipients: + corona10, gvanrossum, vstinner
2020-04-23 02:48:54corona10setmessageid: <1587610134.42.0.272743433509.issue40369@roundup.psfhosted.org>
2020-04-23 02:48:54corona10linkissue40369 messages
2020-04-23 02:48:54corona10create