New submission from Dong-hee Na <donghee.n...@gmail.com>:

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%) |
+--------------------+----------------------+-----------------------------+

----------
components: Interpreter Core
files: bench_generic_alias.py
messages: 367074
nosy: corona10, gvanrossum, vstinner
priority: normal
severity: normal
status: open
title: Use PEP 590 vectorcall to speed up GenericAlias.
versions: Python 3.9
Added file: https://bugs.python.org/file49087/bench_generic_alias.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40369>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to