[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-05-26 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the help Petr. I close the issue, it's now fixed! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-02 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9bb5658bd122d40fff9f34a912be3297b303d18b by Victor Stinner in branch 'master': bpo-43688: Support "make regen-limited-abi" in debug mode (GH-25133) https://github.com/python/cpython/commit/9bb5658bd122d40fff9f34a912be3297b303d18b -- _

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-02 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3359cab038968935b40344fad7c30d211f9692e4 by Victor Stinner in branch 'master': bpo-43688: Support the limited C API in debug mode (GH-25131) https://github.com/python/cpython/commit/3359cab038968935b40344fad7c30d211f9692e4 --

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-02 Thread STINNER Victor
STINNER Victor added the comment: In release mode, I get the libraries: * xxlimited.cpython-310-x86_64-linux-gnu.so * xxlimited_35.cpython-310-x86_64-linux-gnu.so In debug mode, I get the libraries: * xxlimited.cpython-310d-x86_64-linux-gnu.so * xxlimited_35.cpython-310d-x86_64-linux-gnu.so

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-02 Thread STINNER Victor
STINNER Victor added the comment: I modified my PR 25131 to only implement Py_INCREF/Py_DECREF as opaque function calls under two conditions: * Python is built in debug mode * Py_LIMITED_API macro targets Python 3.10 or newer So this PR 25131 now only has an impact on performance if Python i

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file49927/bench.patch ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file49926/bench_testcapi.py ___ Python tracker ___ ___ Python-bugs-list maili

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file49925/bench_limited.py ___ Python tracker ___ ___ Python-bugs-list mailin

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread STINNER Victor
STINNER Victor added the comment: I wrote a microbenchmark on Py_INCREF()+Py_DECREF(): $ python3 -m pyperf compare_to ref.json limited.json Mean +- std dev: [ref] 3.45 ns +- 0.17 ns -> [limited] 6.03 ns +- 0.21 ns: 1.75x slower If a function is only made of Py_INCREF() and Py_DECREF(), it c

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread STINNER Victor
STINNER Victor added the comment: > New changeset baf10da75072d1f8ec714d3c2c8550d34db343a9 by Victor Stinner in > branch 'master': > bpo-43688: Run make regen-limited-abi (GH-25134) With this change, "Tests / Check if generated files are up to date" job started fails (on PR 25135): "Some sym

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2ac0515027699b5694d9a6ff40f1ddaba82c74c2 by Victor Stinner in branch 'master': bpo-43688: Fix Py_LIMITED_API version of xxlimited (GH-25135) https://github.com/python/cpython/commit/2ac0515027699b5694d9a6ff40f1ddaba82c74c2 --

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread Petr Viktorin
Petr Viktorin added the comment: If you do this, please check the performance impact. Py_INCREF/Py_DECREF are very common. -- ___ Python tracker ___ _

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23882 pull_request: https://github.com/python/cpython/pull/25135 ___ Python tracker ___ __

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset baf10da75072d1f8ec714d3c2c8550d34db343a9 by Victor Stinner in branch 'master': bpo-43688: Run make regen-limited-abi (GH-25134) https://github.com/python/cpython/commit/baf10da75072d1f8ec714d3c2c8550d34db343a9 -- _

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23881 pull_request: https://github.com/python/cpython/pull/25134 ___ Python tracker ___ __

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23880 pull_request: https://github.com/python/cpython/pull/25133 ___ Python tracker ___ __

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread STINNER Victor
STINNER Victor added the comment: One nice advantage of this change is that it becomes possible to check for reference leaks in C extensions written with the limited C API! $ ./python -m test test_xxlimited -R 3:3 0:00:00 load avg: 2.99 Run tests sequentially 0:00:00 load avg: 2.99 [1/1] test

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +petr.viktorin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +23877 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25131 ___ Python tracker ___ _

[issue43688] [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF)

2021-04-01 Thread STINNER Victor
Change by STINNER Victor : -- title: [C API] Support the limited C API in debug build (Py_INCREF and Py_DECREF) -> [C API] Support the limited C API in debug mode (Py_INCREF and Py_DECREF) ___ Python tracker __