[issue28915] Modify PyObject_CallFunction() to use fast call internally

2016-12-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fa9933bf4ea0 by Serhiy Storchaka in branch 'default':
Issue #28915: Exclude _Py_VaBuildStack from the limited API.
https://hg.python.org/cpython/rev/fa9933bf4ea0

--

___
Python tracker 

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



[issue28915] Modify PyObject_CallFunction() to use fast call internally

2016-12-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bec846dd92e8 by Victor Stinner in branch 'default':
Fix _PyObject_CallFunctionVa(), use the small stack
https://hg.python.org/cpython/rev/bec846dd92e8

--

___
Python tracker 

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



[issue28915] Modify PyObject_CallFunction() to use fast call internally

2016-12-09 Thread STINNER Victor

STINNER Victor added the comment:

The main feature was implemented, so I close the issue.

Enjoy faster slots! (Many other less important functions are also faster.)

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue28915] Modify PyObject_CallFunction() to use fast call internally

2016-12-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 807688539b56 by Victor Stinner in branch 'default':
Fix refleak introduced in change 032cbdb596fe
https://hg.python.org/cpython/rev/807688539b56

New changeset ceb22b8f6d32 by Victor Stinner in branch 'default':
Use _PyObject_CallMethodIdObjArgs() in _ctypes
https://hg.python.org/cpython/rev/ceb22b8f6d32

New changeset ef05cc5cc651 by Victor Stinner in branch 'default':
Use _PyObject_CallMethodIdObjArgs() in _elementtree
https://hg.python.org/cpython/rev/ef05cc5cc651

New changeset 5b41b92a7ccf by Victor Stinner in branch 'default':
Use _PyObject_CallMethodIdObjArgs() in _datetime
https://hg.python.org/cpython/rev/5b41b92a7ccf

New changeset 434e76e0ee17 by Victor Stinner in branch 'default':
Use _PyObject_CallMethodIdObjArgs() in _io
https://hg.python.org/cpython/rev/434e76e0ee17

New changeset 4545a2293e01 by Victor Stinner in branch 'default':
Use _PyObject_CallMethodIdObjArgs()
https://hg.python.org/cpython/rev/4545a2293e01

New changeset 4321f833a4e0 by Victor Stinner in branch 'default':
Use PyObject_CallFunctionObjArgs()
https://hg.python.org/cpython/rev/4321f833a4e0

--

___
Python tracker 

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



[issue28915] Modify PyObject_CallFunction() to use fast call internally

2016-12-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 39bed12135c1 by Victor Stinner in branch 'default':
Issue #28915: Use _PyObject_CallNoArg()
https://hg.python.org/cpython/rev/39bed12135c1

New changeset b29c719d5992 by Victor Stinner in branch 'default':
Use _PyObject_CallMethodIdObjArgs() in _asyncio
https://hg.python.org/cpython/rev/b29c719d5992

--

___
Python tracker 

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



[issue28915] Modify PyObject_CallFunction() to use fast call internally

2016-12-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b771cf37714b by Victor Stinner in branch 'default':
Add _PyObject_FastCallVa() helper
https://hg.python.org/cpython/rev/b771cf37714b

New changeset 455169e87bb3 by Victor Stinner in branch 'default':
Add _PyObject_CallFunctionVa() helper
https://hg.python.org/cpython/rev/455169e87bb3

New changeset dd0d162593c5 by Victor Stinner in branch 'default':
modsupport: replace int with Py_ssize_t
https://hg.python.org/cpython/rev/dd0d162593c5

New changeset 69d5dcf31f4a by Victor Stinner in branch 'default':
modsupport: replace int with Py_ssize_t
https://hg.python.org/cpython/rev/69d5dcf31f4a

New changeset c1414b182232 by Victor Stinner in branch 'default':
Add _Py_VaBuildStack() function
https://hg.python.org/cpython/rev/c1414b182232

New changeset 69948a157507 by Victor Stinner in branch 'default':
_PyObject_CallFunctionVa() uses fast call
https://hg.python.org/cpython/rev/69948a157507

New changeset b9eb35435178 by Victor Stinner in branch 'default':
Don't parenthesis in _PyObject_CallMethodId() format
https://hg.python.org/cpython/rev/b9eb35435178

New changeset 67302e6caa29 by Victor Stinner in branch 'default':
Use _PyObject_CallMethodIdObjArgs()
https://hg.python.org/cpython/rev/67302e6caa29

New changeset 032cbdb596fe by Victor Stinner in branch 'default':
build_struct_time() uses Py_BuildValue()
https://hg.python.org/cpython/rev/032cbdb596fe

New changeset 49a7fdc0d40a by Victor Stinner in branch 'default':
time_strptime() uses PyObject_Call()
https://hg.python.org/cpython/rev/49a7fdc0d40a

New changeset 6e748eb79038 by Victor Stinner in branch 'default':
Add _PyObject_VaCallFunctionObjArgs() private function
https://hg.python.org/cpython/rev/6e748eb79038

New changeset adcd9131b7c6 by Victor Stinner in branch 'default':
Use _PyObject_FastCallVa() in type slots
https://hg.python.org/cpython/rev/adcd9131b7c6

--
nosy: +python-dev

___
Python tracker 

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



[issue28915] Modify PyObject_CallFunction() to use fast call internally

2016-12-08 Thread STINNER Victor

STINNER Victor added the comment:

bench_slots.py: microbenchmark on __int__ and __getitem__ slots.

--
Added file: http://bugs.python.org/file45808/bench_slots.py

___
Python tracker 

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



[issue28915] Modify PyObject_CallFunction() to use fast call internally

2016-12-08 Thread STINNER Victor

New submission from STINNER Victor:

This issue tracks changes to support the "fast call" calling convention in 
functions:

* PyObject_CallFunctionObjArgs()
* PyObject_CallMethodObjArgs()
* _PyObject_CallMethodIdObjArgs()

A "stack" of Python objects is created to pass arguments to 
_PyObject_FastCall(). The goal is to avoid the creation of a temporary tuple to 
call functions.

The patch serie changes slots (typeobject.c), so calling Python slots from 
Python should avoid completely the creation of temporary tuples to pass 
parameters.


Microbenchmark on a simple class with an __int__() method, call int(o):

int(o): Median +- std dev: [ref] 239 ns +- 13 ns -> [patch] 219 ns +- 14 ns: 
1.10x faster (-9%)


Microbenchmark on a simple class with an __getitem__() method, call o[100]:

o[100]: Median +- std dev: [ref] 211 ns +- 11 ns -> [patch] 172 ns +- 11 ns: 
1.23x faster (-19%)


Comparison between Python 2.7, 3.5, 3.7 and 3.7+patch, 3.5 is used as the 
reference:

int(o)
==

Median +- std dev: [3.5] 271 ns +- 15 ns -> [3.7] 239 ns +- 13 ns: 1.13x faster 
(-12%)
Median +- std dev: [3.5] 271 ns +- 15 ns -> [patch] 219 ns +- 14 ns: 1.24x 
faster (-19%)
Median +- std dev: [3.5] 271 ns +- 15 ns -> [2.7] 401 ns +- 21 ns: 1.48x slower 
(+48%)

o[100]
==

Median +- std dev: [3.5] 206 ns +- 5 ns -> [3.7] 211 ns +- 11 ns: 1.02x slower 
(+2%)
Not significant!
Median +- std dev: [3.5] 206 ns +- 5 ns -> [patch] 172 ns +- 11 ns: 1.20x 
faster (-17%)
Median +- std dev: [3.5] 206 ns +- 5 ns -> [2.7] 254 ns +- 15 ns: 1.23x slower 
(+23%)

--
messages: 282748
nosy: haypo
priority: normal
severity: normal
status: open
title: Modify PyObject_CallFunction() to use fast call internally
type: performance
versions: Python 3.7

___
Python tracker 

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