[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-07-06 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 97558d6b08a656eae209d49b206f703cee0359a2 by Dong-hee Na in branch '3.9': [3.9] bpo-37207: Update whatsnews for 3.9 (GH-21337) https://github.com/python/cpython/commit/97558d6b08a656eae209d49b206f703cee0359a2 --

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-07-06 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +20496 pull_request: https://github.com/python/cpython/pull/21350 ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-07-06 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset b4a9263708cc67c98c4d53b16933f6e5dd07990f by Dong-hee Na in branch 'master': bpo-37207: Update whatsnews for 3.9 (GH-21337) https://github.com/python/cpython/commit/b4a9263708cc67c98c4d53b16933f6e5dd07990f -- nosy: +lukasz.langa

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-07-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +20494 pull_request: https://github.com/python/cpython/pull/21347 ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-07-05 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +20485 pull_request: https://github.com/python/cpython/pull/21337 ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-04-07 Thread Petr Viktorin
Petr Viktorin added the comment: As discussed briefly in Mark's PR, benchmarks like this are now slower: ret = dict(**{'a': 2, 'b': 4, 'c': 6, 'd': 8}) Python 3.8: Mean +- std dev: 281 ns +- 9 ns master: Mean +- std dev: 456 ns +- 14 ns --

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-04-04 Thread Dong-hee Na
Dong-hee Na added the comment: IMHO, we can close this PR. Summary: The PEP 590 vectorcall is applied to list, tuple, dict, set, frozenset and range If someone wants to apply PEP 590 to other cases. Please open a new issue for it! Thank you, Mark, Jeroen, Petr and everyone who works for

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-04-01 Thread STINNER Victor
STINNER Victor added the comment: > When I designed the FASTCALL calling convention, I experimented a new > tp_fastcall slot to PyTypeObject to optimize __call__() method: bpo-29259. Ah, by the way, I also made an attempt to use the FASTCALL calling convention for tp_new and tp_init:

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-04-01 Thread STINNER Victor
STINNER Victor added the comment: Can we now close this issue? Or does someone plan to push further optimizations. Maybe new issues can be opened for next optimizations? -- ___ Python tracker

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-04-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset e27916b1fc0364e3627438df48550c16f0b80b82 by Dong-hee Na in branch 'master': bpo-37207: Use PEP 590 vectorcall to speed up dict() (GH-19280) https://github.com/python/cpython/commit/e27916b1fc0364e3627438df48550c16f0b80b82 --

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-04-01 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +18637 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/19280 ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-04-01 Thread STINNER Victor
STINNER Victor added the comment: When I designed the FASTCALL calling convention, I experimented a new tp_fastcall slot to PyTypeObject to optimize __call__() method: bpo-29259. Results on the pyperformance benchmark suite were not really convincing and I had technical issues (decide if

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-04-01 Thread Petr Viktorin
Petr Viktorin added the comment: > Can I submit the patch? Yes! If you think a patch is ready for review, just submit it. There's not much we can comment on before we see the code :) (I hope that doesn't contradict what your mentor says...) --

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-04-01 Thread Dong-hee Na
Dong-hee Na added the comment: @vstinner @petr.viktorin Looks like benchmark showing very impressive result. Can I submit the patch? -- ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-04-01 Thread Dong-hee Na
Change by Dong-hee Na : Added file: https://bugs.python.org/file49019/bench_dict_kwnames.py ___ Python tracker ___ ___ Python-bugs-list

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-04-01 Thread Dong-hee Na
Change by Dong-hee Na : Added file: https://bugs.python.org/file49018/bench_dict_empty.py ___ Python tracker ___ ___ Python-bugs-list

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-04-01 Thread Dong-hee Na
Dong-hee Na added the comment: +--+---+-+ | Benchmark| master-dict-empty | bpo-37207-dict-empty| +==+===+=+ | bench dict empty | 502 ns| 443 ns:

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-04-01 Thread Dong-hee Na
Change by Dong-hee Na : Added file: https://bugs.python.org/file49020/bench_dict_update.py ___ Python tracker ___ ___ Python-bugs-list

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-04-01 Thread Petr Viktorin
Petr Viktorin added the comment: Definitely! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-31 Thread Dong-hee Na
Dong-hee Na added the comment: @vstinner @petr.viktorin I 'd like to experiment dict vector call and finalize the work. Can I proceed it? -- ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-31 Thread STINNER Victor
STINNER Victor added the comment: Oh sorry, I missed the dict. -- resolution: fixed -> ___ Python tracker ___ ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-31 Thread Petr Viktorin
Petr Viktorin added the comment: The change to dict() was not covered by the smaller PRs. That one will need more thought, but AFAIK it wasn't yet rejected. -- status: closed -> open ___ Python tracker

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-30 Thread STINNER Victor
STINNER Victor added the comment: All PRs are now merged. Thanks to everybody who was involved in this issue. It's a nice speedup which is always good to take ;-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: enhancement -> performance

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset ce105541f8ebcf2dffcadedfdeffdb698a0edb44 by Petr Viktorin in branch 'master': bpo-37207: Use vectorcall for list() (GH-18928) https://github.com/python/cpython/commit/ce105541f8ebcf2dffcadedfdeffdb698a0edb44 --

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-22 Thread STINNER Victor
STINNER Victor added the comment: Remaining issue: optimize list(iterable), PR 18928. I reviewed the PR and I'm waiting for Petr. -- ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-21 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-18 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1c60567b9a4c8f77e730de9d22690d8e68d7e5f6 by Dong-hee Na in branch 'master': bpo-37207: Use PEP 590 vectorcall to speed up frozenset() (GH-19053) https://github.com/python/cpython/commit/1c60567b9a4c8f77e730de9d22690d8e68d7e5f6 --

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-17 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +18404 pull_request: https://github.com/python/cpython/pull/19053 ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: > What do you think? I would prefer to see a PR to give my opinion :) -- ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-17 Thread Dong-hee Na
Dong-hee Na added the comment: Victor, frozenset is the last basic builtin collection which is not applied to this improvement yet. frozenset also show similar performance improvement by using vectorcall pyperf compare_to master.json bpo-37207.json Mean +- std dev: [master] 2.26 us +- 0.06

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6ff79f65820031b219622faea8425edaec9a43f3 by Dong-hee Na in branch 'master': bpo-37207: Use PEP 590 vectorcall to speed up set() constructor (GH-19019) https://github.com/python/cpython/commit/6ff79f65820031b219622faea8425edaec9a43f3

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset 87ec86c425a5cd3ad41b831b54c0ce1a0c363f4b by Dong-hee Na in branch 'master': bpo-37207: Add _PyArg_NoKwnames() helper function (GH-18980) https://github.com/python/cpython/commit/87ec86c425a5cd3ad41b831b54c0ce1a0c363f4b --

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset c98f87fc330eb40fbcff627dfc50958785a44f35 by Dong-hee Na in branch 'master': bpo-37207: Use _PyArg_CheckPositional() for tuple vectorcall (GH-18986) https://github.com/python/cpython/commit/c98f87fc330eb40fbcff627dfc50958785a44f35 --

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-15 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +18368 pull_request: https://github.com/python/cpython/pull/19019 ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-14 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +18334 pull_request: https://github.com/python/cpython/pull/18986 ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-13 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +18328 pull_request: https://github.com/python/cpython/pull/18980 ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9ee88cde1abf7f274cc55a0571b1c2cdb1263743 by Dong-hee Na in branch 'master': bpo-37207: Use PEP 590 vectorcall to speed up tuple() (GH-18936) https://github.com/python/cpython/commit/9ee88cde1abf7f274cc55a0571b1c2cdb1263743 -- nosy:

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-11 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 nosy_count: 5.0 -> 6.0 pull_requests: +18288 pull_request: https://github.com/python/cpython/pull/18936 ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-11 Thread Petr Viktorin
Change by Petr Viktorin : -- nosy: +petr.viktorin nosy_count: 4.0 -> 5.0 pull_requests: +18280 pull_request: https://github.com/python/cpython/pull/18928 ___ Python tracker

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-02-18 Thread miss-islington
miss-islington added the comment: New changeset 6e35da976370e7c2e028165c65d7d7d42772a71f by Petr Viktorin in branch 'master': bpo-37207: Use vectorcall for range() (GH-18464) https://github.com/python/cpython/commit/6e35da976370e7c2e028165c65d7d7d42772a71f --

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-02-11 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +17837 pull_request: https://github.com/python/cpython/pull/18464 ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2019-09-12 Thread Inada Naoki
Inada Naoki added the comment: $ ./python -m pyperf timeit --compare-to ./python-master 'dict()' python-master: . 89.9 ns +- 1.2 ns python: . 72.5 ns +- 1.6 ns Mean +- std dev: [python-master] 89.9 ns +- 1.2 ns -> [python] 72.5 ns +- 1.6 ns: 1.24x

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2019-08-15 Thread miss-islington
miss-islington added the comment: New changeset 37806f404f57b234902f0c8de9a04647ad01b7f1 by Miss Islington (bot) (Jeroen Demeyer) in branch 'master': bpo-37207: enable vectorcall for type.__call__ (GH-14588) https://github.com/python/cpython/commit/37806f404f57b234902f0c8de9a04647ad01b7f1

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2019-07-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: One thing that keeps bothering me when using vectorcall for type.__call__ is that we would have two completely independent code paths for constructing an object: the new one using vectorcall and the old one using tp_call, which in turn calls tp_new and

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2019-07-04 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +14406 pull_request: https://github.com/python/cpython/pull/14588 ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2019-07-04 Thread Inada Naoki
Inada Naoki added the comment: Can we call tp_call instead of vectorcall when kwargs is not empty? https://github.com/python/cpython/blob/7f41c8e0dd237d1f3f0a1d2ba2f3ee4e4bd400a7/Objects/call.c#L209-L219 For example, dict_init may be faster than dict_vectorcall when `d2 = dict(**d1)`.

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2019-06-09 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +13796 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13930 ___ Python tracker ___

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2019-06-09 Thread Mark Shannon
New submission from Mark Shannon : PEP 590 allows us the short circuit the __new__, __init__ slow path for commonly created builtin types. As an initial step, we can speed up calls to range, list and dict by about 30%. See https://gist.github.com/markshannon/5cef3a74369391f6ef937d52cca9bfc8