[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-03-17 Thread Mark Shannon


Change by Mark Shannon :


--
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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-03-16 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +30025
pull_request: https://github.com/python/cpython/pull/31933

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-02-23 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 424023efee5b21567b4725015ef143b627112e3c by Brandt Bucher in 
branch 'main':
bpo-46329: Fix test failure when `Py_STATS` is enabled (GH-31511)
https://github.com/python/cpython/commit/424023efee5b21567b4725015ef143b627112e3c


--

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-02-22 Thread Brandt Bucher


Change by Brandt Bucher :


--
pull_requests: +29638
pull_request: https://github.com/python/cpython/pull/31511

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-02-22 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +29626
pull_request: https://github.com/python/cpython/pull/31496

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-02-21 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 59585d6b2ea50d7bc3a9b336da5bde61367f527c by Mark Shannon in 
branch 'main':
bpo-46329: Streamline calling sequence a bit. (GH-31465)
https://github.com/python/cpython/commit/59585d6b2ea50d7bc3a9b336da5bde61367f527c


--

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-02-21 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +29595
pull_request: https://github.com/python/cpython/pull/31465

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-02-18 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset cf345e945f48f54785799390c2e92c5310847bd4 by Mark Shannon in 
branch 'main':
bpo-46329: Change calling sequence (again) (GH-31373)
https://github.com/python/cpython/commit/cf345e945f48f54785799390c2e92c5310847bd4


--

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-02-16 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +29523
pull_request: https://github.com/python/cpython/pull/31373

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-31 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +29216
pull_request: https://github.com/python/cpython/pull/31033

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I'm reverting PR30855 for the time being given our buildbot policy.

--

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-29 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
Removed message: https://bugs.python.org/msg412088

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I'm reverting #30855 for the time being given our buildbot policy.

--

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-29 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +29190
pull_request: https://github.com/python/cpython/pull/31011

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-28 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +29186
pull_request: https://github.com/python/cpython/pull/31005

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Seems that this PR is causing some segfaults. See 
https://github.com/python/cpython/pull/30855#issuecomment-1024658459

--
nosy: +pablogsal

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-28 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 89fd7c34520aac493a8784a221366ed04452612b by Mark Shannon in 
branch 'main':
bpo-46329: Split calls into precall and call instructions. (GH-30855)
https://github.com/python/cpython/commit/89fd7c34520aac493a8784a221366ed04452612b


--

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-24 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-10 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-10 Thread Mark Shannon


New submission from Mark Shannon :

Most calls (not those with *args and/or **kwargs) are compiled to the 
`CALL_NO_KW` and `CALL_KW` instructions, possibly with a `PRECALL_METHOD` 
prefix.

We want to unify the `CALL_NO_KW` and `CALL_KW` instructions into a single 
`CALL` instruction and add two new instructions: `PRECALL_FUNCTION` and 
`KW_NAMES`.
All call sequences would start with `PRECALL_FUNCTION` or `PRECALL_METHOD`. 
`PRECALL_METHOD` would continue to pair with `LOAD_METHOD` as it does now. 
`PRECALL_FUNCTION` would effectively be a no-op, but would be needed to set up 
internal interpreter variables.

`CALL_NO_KW` would become `CALL` and `CALL_KW` would become `KW_NAMES; CALL`.

Why?

Specializing calls is an important optimization, but calls are complicated and 
we want to specialized for both the type of the callable and the shape of the 
call.

By breaking up calls in this way, we can specialize for the type and for the 
shape mostly independently.
We can specialize for classes, bound-methods and other objects that ultimately 
call a Python function in the `PRECALL` instruction and specialize for the 
shape of the arguments in the `CALL` instruction.


See https://github.com/faster-cpython/ideas/discussions/210 for more rationale.

--
assignee: Mark.Shannon
messages: 410209
nosy: Mark.Shannon, kj
priority: normal
severity: normal
status: open
title: Split up the CALL_NO_KW and CALL_KW instructions.
type: performance
versions: Python 3.11

___
Python tracker 

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