[issue38644] Pass explicitly tstate to function calls

2021-09-07 Thread STINNER Victor


STINNER Victor  added the comment:

Raymond:
> This adds cost to our most critical code paths.  For example, type_call() 
> will now be slower for every single object instantiation.

This issue is now closed. Please open a new issue if you consider that the code 
should be modified. It would also help to have a benchmark if it's a 
performance regression ;-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2021-09-07 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

This adds cost to our most critical code paths.  For example, type_call() will 
now be slower for every single object instantiation.

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-04-13 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-03-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1c1e68cf3e3a2a19a0edca9a105273e11c6e by Victor Stinner in 
branch 'master':
bpo-38644: Use _PySys_Audit(): pass tstate explicitly (GH-19183)
https://github.com/python/cpython/commit/1c1e68cf3e3a2a19a0edca9a105273e11c6e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 71a3522ef85df06a3acc718107360e37e4116a15 by Victor Stinner in 
branch 'master':
bpo-38644: Make tstate more explicit inside pystate.c (GH-19182)
https://github.com/python/cpython/commit/71a3522ef85df06a3acc718107360e37e4116a15


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 728189884e0e128c4ffc57b785b04584d57a90c0 by Victor Stinner in 
branch 'master':
bpo-38644: Pass tstate explicitly in signalmodule.c (GH-19184)
https://github.com/python/cpython/commit/728189884e0e128c4ffc57b785b04584d57a90c0


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18543
pull_request: https://github.com/python/cpython/pull/19184

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18542
pull_request: https://github.com/python/cpython/pull/19183

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18541
pull_request: https://github.com/python/cpython/pull/19182

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 08faf0016e1ee590c78f64ddb244767c7801866a by Victor Stinner in 
branch 'master':
bpo-38644: Add _PySys_Audit() which takes tstate (GH-19180)
https://github.com/python/cpython/commit/08faf0016e1ee590c78f64ddb244767c7801866a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18540
pull_request: https://github.com/python/cpython/pull/19180

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-03-16 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18385
pull_request: https://github.com/python/cpython/pull/19034

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-02-11 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset f3fda374685dffa31ebda9e681e00ef7032b8a1d by Victor Stinner in 
branch 'master':
bpo-38644: Rephrase What's New entry (GH-18461)
https://github.com/python/cpython/commit/f3fda374685dffa31ebda9e681e00ef7032b8a1d


--
nosy: +petr.viktorin

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-02-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17835
pull_request: https://github.com/python/cpython/pull/18461

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-02-07 Thread STINNER Victor


STINNER Victor  added the comment:

> One further step would be to change the VECTORCALL/FASTCALL calling 
> convention to pass tstate.

My first strong motivation is to get None singleton from tstate. It's now being 
discussed in bpo-39511: "[subinterpreters] Per-interpreter singletons (None, 
True, False, etc.)".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-02-07 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 877ea88934a5164be4d9f15207694fad4173d87d by Victor Stinner in 
branch 'master':
bpo-38644: Add Py_EnterRecursiveCall() to python3.def (GH-18399)
https://github.com/python/cpython/commit/877ea88934a5164be4d9f15207694fad4173d87d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-02-07 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17775
pull_request: https://github.com/python/cpython/pull/18399

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 61f4db8c56ca4b7e60050d96ecc255cfb03d92a0 by Victor Stinner in 
branch 'master':
bpo-38644: Pass tstate in ceval.c (GH-18222)
https://github.com/python/cpython/commit/61f4db8c56ca4b7e60050d96ecc255cfb03d92a0


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-01-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17602
pull_request: https://github.com/python/cpython/pull/18222

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-01-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2b1df4592e1691017414337514c6e378eb639498 by Victor Stinner in 
branch 'master':
bpo-38644: Pass tstate to _Py_FinishPendingCalls() (GH-17990)
https://github.com/python/cpython/commit/2b1df4592e1691017414337514c6e378eb639498


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-01-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17393
pull_request: https://github.com/python/cpython/pull/17990

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2020-01-13 Thread STINNER Victor


STINNER Victor  added the comment:

> One further step would be to change the VECTORCALL/FASTCALL calling 
> convention to pass tstate. But I am not sure what is the risk to do that in 
> Python 3.9? Cython uses FASTCALL internally for example.

I started a thread on python-dev:
https://mail.python.org/archives/list/python-...@python.org/thread/PIXJAJPWKDGHSQD65VOO2B7FDLU2QLHH/

I also wrote an article on this issue, "Pass the Python thread state 
explicitly":
https://vstinner.github.io/cpython-pass-tstate.html

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-18 Thread STINNER Victor


STINNER Victor  added the comment:

One further step would be to change the VECTORCALL/FASTCALL calling convention 
to pass tstate. But I am not sure what is the risk to do that in Python 3.9? 
Cython uses FASTCALL internally for example.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 51edf8aaa2e17626f9690ed29d25945fc03016b9 by Victor Stinner in 
branch 'master':
bpo-38644: Cleanup ceval.h (GH-17185)
https://github.com/python/cpython/commit/51edf8aaa2e17626f9690ed29d25945fc03016b9


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b5e170f127b57d5b0a4fb58f316acd6191509dce by Victor Stinner in 
branch 'master':
bpo-38644: Add _PyEval_EvalCode() (GH-17183)
https://github.com/python/cpython/commit/b5e170f127b57d5b0a4fb58f316acd6191509dce


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16692
pull_request: https://github.com/python/cpython/pull/17185

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16690
pull_request: https://github.com/python/cpython/pull/17183

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4d231bcc77ac8ce7d11bda0804130dcdd678f710 by Victor Stinner in 
branch 'master':
bpo-38644: Add _PyObject_Call() (GH-17089)
https://github.com/python/cpython/commit/4d231bcc77ac8ce7d11bda0804130dcdd678f710


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b9e681261cd5ce6db0a79461c58d7cc52cfa4902 by Victor Stinner in 
branch 'master':
bpo-38644: Add _PyEval_EvalFrame() with tstate (GH-17131)
https://github.com/python/cpython/commit/b9e681261cd5ce6db0a79461c58d7cc52cfa4902


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-12 Thread STINNER Victor


STINNER Victor  added the comment:

I started a thread on python-dev about this issue:
"Pass the Python thread state to internal C functions"
https://mail.python.org/archives/list/python-...@python.org/thread/PQBGECVGVYFTVDLBYURLCXA3T7IPEHHO/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16641
pull_request: https://github.com/python/cpython/pull/17131

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-08 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16598
pull_request: https://github.com/python/cpython/pull/17089

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-08 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7e433733175e76627d46ed9bdab543860cd1452d by Victor Stinner in 
branch 'master':
bpo-38644: Add _PyObject_VectorcallTstate() (GH-17052)
https://github.com/python/cpython/commit/7e433733175e76627d46ed9bdab543860cd1452d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16566
pull_request: https://github.com/python/cpython/pull/17052

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 17269090940aa20f6079a6b9f27ae319f8cdae14 by Victor Stinner in 
branch 'master':
bpo-38644: Pass tstate to _Py_CheckFunctionResult() (GH-17050)
https://github.com/python/cpython/commit/17269090940aa20f6079a6b9f27ae319f8cdae14


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16564
pull_request: https://github.com/python/cpython/pull/17050

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset be434dc0380d9f5c7c800de9943cc46d55fd9491 by Victor Stinner in 
branch 'master':
bpo-38644: Pass tstate to Py_EnterRecursiveCall() (GH-16997)
https://github.com/python/cpython/commit/be434dc0380d9f5c7c800de9943cc46d55fd9491


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f4b1e3d7c64985f5d5b00f6cc9a1c146bbbfd613 by Victor Stinner in 
branch 'master':
bpo-38644: Add Py_EnterRecursiveCall() to the limited API (GH-17046)
https://github.com/python/cpython/commit/f4b1e3d7c64985f5d5b00f6cc9a1c146bbbfd613


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-11-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16559
pull_request: https://github.com/python/cpython/pull/17046

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

PR 16997 is a first step. The second step will be to pass tstate to:

* _PyObject_Vectorcall()
* _PyObject_MakeTpCall()
* _Py_CheckFunctionResult()

(I have a local branch that I have to rewrite on top of PR 16997.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-10-30 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +16524
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16997

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38644] Pass explicitly tstate to function calls

2019-10-30 Thread STINNER Victor


New submission from STINNER Victor :

Follow-up of bpo-36710 for function calls.

--
components: Interpreter Core
messages: 355716
nosy: vstinner
priority: normal
severity: normal
status: open
title: Pass explicitly tstate to function calls
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com