gh-112069: Adapt set/frozenset methods to Argument Clinic by tomasr8 · Pull Request #115112 · python/cpython
added 4 commits
February 6, 2024 23:52
tomasr8
marked this pull request as ready for review
erlend-aasland
changed the title
gh-112069: Convert set/frozenset methods to Argument Clinic
gh-112069: Adapt set/frozenset methods to Argument Clinic
tomasr8
deleted the
setobject-argument-clinic
branch
skirpichev added a commit to skirpichev/cpython that referenced this pull request
Oct 28, 2024Current patch partially address issue, working in case when all arguments either positional-only or vararg. This also converts gcd(), lcm() and hypot() functions of the math module to the Argument Clinic. Fix issue python#101123. Objects/setobject.c and Modules/gcmodule.c adapted. This fixes slight performance regression for set methods, introduced by python#115112: | Benchmark | ref | patch | |----------------------|:------:|:--------------------:| | set().update(s1, s2) | 354 ns | 264 ns: 1.34x faster | Benchmark code: ```py import pyperf s1, s2 = {1}, {2} runner = pyperf.Runner() runner.bench_func('set().update(s1, s2)', set().update, s1, s2) ```
erlend-aasland pushed a commit that referenced this pull request
Oct 31, 2024picnixz pushed a commit to picnixz/cpython that referenced this pull request
Dec 8, 2024…arargs (python#126064) Avoid temporary tuple creation when all arguments either positional-only or vararg. Objects/setobject.c and Modules/gcmodule.c adapted. This fixes slight performance regression for set methods, introduced by pythongh-115112.
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request
Jan 12, 2025…arargs (python#126064) Avoid temporary tuple creation when all arguments either positional-only or vararg. Objects/setobject.c and Modules/gcmodule.c adapted. This fixes slight performance regression for set methods, introduced by pythongh-115112.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters