[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2022-02-11 Thread Nikita Sobolev


Change by Nikita Sobolev :


--
nosy: +sobolevn
nosy_count: 4.0 -> 5.0
pull_requests: +29437
pull_request: https://github.com/python/cpython/pull/31273

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2022-01-05 Thread Mark Shannon


Mark Shannon  added the comment:

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

--

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2022-01-05 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +28621
pull_request: https://github.com/python/cpython/pull/30415

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-12-15 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 3a60bfef49b3324660a615a8e6d10710e5f669d9 by Mark Shannon in 
branch 'main':
bpo-44525: Specialize for calls to type and other builtin classes with 1 
argument. (GH-29942)
https://github.com/python/cpython/commit/3a60bfef49b3324660a615a8e6d10710e5f669d9


--

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-12-14 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +28329
pull_request: https://github.com/python/cpython/pull/30107

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-12-14 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 9f8f45144b6f0ad481e80570538cce89b414f7f9 by Mark Shannon in 
branch 'main':
bpo-44525: Split calls into PRECALL and CALL (GH-30011)
https://github.com/python/cpython/commit/9f8f45144b6f0ad481e80570538cce89b414f7f9


--

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-12-09 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +28233
pull_request: https://github.com/python/cpython/pull/30011

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-12-06 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +28167
pull_request: https://github.com/python/cpython/pull/29942

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-11-23 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 135cabd328504e1648d17242b42b675cdbd0193b by Mark Shannon in 
branch 'main':
bpo-44525: Copy free variables in bytecode to allow calls to inner functions to 
be specialized (GH-29595)
https://github.com/python/cpython/commit/135cabd328504e1648d17242b42b675cdbd0193b


--

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-11-17 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-29 Thread Sam James


Change by Sam James :


--
nosy: +thesamesam

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-28 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 0a1a36b74bdf8da286924a1c9652853b1c46f536 by Ken Jin in branch 
'main':
bpo-44525: Add recursive checks for `CALL_FUNCTION_BUILTIN_O` (GH-29271)
https://github.com/python/cpython/commit/0a1a36b74bdf8da286924a1c9652853b1c46f536


--

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-28 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +27535
pull_request: https://github.com/python/cpython/pull/29271

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Unfortunately, PR 26934 has broken thes 390x RHEL7 LTO 3.x buildbot as you can 
see before. As per the buildbot maintenance procedures, we will need to revert 
this PR unless is fixed in 24 hours.

@markshannon @Fidget-Spinner

--
nosy: +pablogsal

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-20 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 8863a0fcc5f04ab7c3428e713917831f9b1deb18 by Mark Shannon in 
branch 'main':
bpo-44525: Specialize simple Python calls. (GH-29033)
https://github.com/python/cpython/commit/8863a0fcc5f04ab7c3428e713917831f9b1deb18


--

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-20 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +27355
pull_request: https://github.com/python/cpython/pull/29033

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-19 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 3163e68c342434db37c69669017f96a4bb2d5f13 by Ken Jin in branch 
'main':
bpo-44525: Specialize ``CALL_FUNCTION`` for C function calls (GH-26934)
https://github.com/python/cpython/commit/3163e68c342434db37c69669017f96a4bb2d5f13


--

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-06-28 Thread Ken Jin


Change by Ken Jin :


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

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-06-28 Thread Ken Jin


New submission from Ken Jin :

CALL_FUNCTION can be specialized. Copying from Mark's comments 
https://github.com/faster-cpython/ideas/issues/54#issue-898013125

```
There are a number of specializations of CALL_FUNCTION that make sense:

1. Calls to a Python function where the arguments and parameters match exactly.
2. Calls to a Python function with keyword arguments, or defaults, when the 
argument shuffle can be pre-computed.
3. Calls to builtin functions.
4. Calls to specific builtin functions, specifically len and instance.
5. Calls to type with a single argument.
6. Instantiation of a "normal" class, that is a class that does not redefine 
__new__ and whose metaclass is type.
```

I've prepared a PR that should speed up non-keyword calls to PyCFunction. It 
covers specializations 3 and 4. Stable pyperf microbenchmarks show 5-15% less 
call overhead for some PyCFunctions. Please see 
https://github.com/faster-cpython/ideas/issues/54#issuecomment-868978681 for 
the benchmark script and results.

This issue is also tied to issue44207 (Add a version number to Python 
functions) which will be required for specializations 1 and 2.

--
messages: 396639
nosy: Mark.Shannon, kj
priority: normal
severity: normal
status: open
title: Implement CALL_FUNCTION adaptive interpreter optimizations
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