Message367074
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%) |
+--------------------+----------------------+-----------------------------+ |
|
Date |
User |
Action |
Args |
2020-04-23 02:48:54 | corona10 | set | recipients:
+ corona10, gvanrossum, vstinner |
2020-04-23 02:48:54 | corona10 | set | messageid: <1587610134.42.0.272743433509.issue40369@roundup.psfhosted.org> |
2020-04-23 02:48:54 | corona10 | link | issue40369 messages |
2020-04-23 02:48:54 | corona10 | create | |
|