0
0
mirror of https://github.com/python/cpython.git synced 2024-12-01 11:15:56 +01:00
cpython/Include
Victor Stinner 434723f94c call_method() now uses _PyObject_FastCall()
Issue #29233: Replace the inefficient _PyObject_VaCallFunctionObjArgs() with
_PyObject_FastCall() in call_method() and call_maybe().

Only a few functions call call_method() and call it with a fixed number of
arguments. Avoid the complex and expensive _PyObject_VaCallFunctionObjArgs()
function, replace it with an array allocated on the stack with the exact number
of argumlents.

It reduces the stack consumption, bytes per call, before => after:

test_python_call: 1168 => 1152 (-16 B)
test_python_getitem: 1344 => 1008 (-336 B)
test_python_iterator: 1568 => 1232 (-336 B)

Remove the _PyObject_VaCallFunctionObjArgs() function which became useless.
Rename it to object_vacall() and make it private.
2017-01-11 00:07:40 +01:00
..
abstract.h call_method() now uses _PyObject_FastCall() 2017-01-11 00:07:40 +01:00
accu.h
asdl.h
ast.h
bitset.h
bltinmodule.h
boolobject.h
bytearrayobject.h
bytes_methods.h Issue #26765: Moved common code and docstrings for bytes and bytearray methods 2016-05-04 22:23:26 +03:00
bytesobject.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 14:57:39 +02:00
cellobject.h
ceval.h Uniformize argument names of "call" functions 2016-12-06 16:27:24 +01:00
classobject.h
code.h Issue #18896: Python function can now have more than 255 parameters. 2016-12-16 19:19:02 +02:00
codecs.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 14:57:39 +02:00
compile.h
complexobject.h
datetime.h Closes issue #24773: Implement PEP 495 (Local Time Disambiguation). 2016-07-22 18:47:04 -04:00
descrobject.h Issue #28761: The fields name and doc of structures PyMemberDef, PyGetSetDef, 2016-11-22 07:58:08 +02:00
dictobject.h Issue #28427: old keys should not remove new values from 2016-12-27 14:34:54 +01:00
dtoa.h
dynamic_annotations.h
enumobject.h
errcode.h
eval.h
fileobject.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 14:57:39 +02:00
fileutils.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 14:57:39 +02:00
floatobject.h Issue #11734: Add support for IEEE 754 half-precision floats to the struct module. Original patch by Eli Stevens. 2016-09-03 17:21:29 +01:00
frameobject.h Issue #29049: Call _PyObject_GC_TRACK() lazily when calling Python function. 2016-12-24 20:19:08 +09:00
funcobject.h Add _PyObject_FastCallKeywords() 2016-09-09 12:36:44 -07:00
genobject.h Issue #23996: Added _PyGen_SetStopIterationValue for safe raising 2016-11-06 18:47:03 +02:00
graminit.h Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations. 2016-09-08 20:50:03 -07:00
grammar.h properly free memory in pgen 2016-09-18 18:00:25 -07:00
import.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 14:57:39 +02:00
intrcheck.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
iterobject.h
listobject.h
longintrepr.h replace Python aliases for standard integer types with the standard integer types (#17884) 2016-09-06 13:24:00 -07:00
longobject.h Issue #19569: Compiler warnings are now emitted if use most of deprecated 2016-11-20 12:16:46 +02:00
marshal.h
memoryobject.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 14:57:39 +02:00
metagrammar.h
methodobject.h Issue #27810: Exclude METH_FASTCALL from the stable API 2016-09-12 15:55:21 +02:00
modsupport.h Issue #28915: Exclude _Py_VaBuildStack from the limited API. 2016-12-27 17:59:04 +02:00
moduleobject.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 15:04:59 +02:00
namespaceobject.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
node.h
object.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 14:57:39 +02:00
objimpl.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 14:57:39 +02:00
odictobject.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 15:04:59 +02:00
opcode.h Issue #26110: Add LOAD_METHOD/CALL_METHOD opcodes. 2016-12-13 19:03:51 -05:00
osdefs.h
osmodule.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 14:57:39 +02:00
parsetok.h
patchlevel.h Prepare for 3.6.1. Any further 3.6.0 release candidates and 3.6.0 final will be cherrypicked and merged here. 2016-12-07 01:59:27 -05:00
pgen.h
pgenheaders.h prefix freegrammar (closes #28413) 2016-10-10 23:21:02 -07:00
py_curses.h
pyarena.h
pyatomic.h replace Py_(u)intptr_t with the c99 standard types 2016-09-06 13:47:26 -07:00
pycapsule.h
pyctype.h
pydebug.h Issue #1602: Windows console doesn't input or print Unicode (PEP 528) 2016-08-30 21:22:36 -07:00
pydtrace.d DTrace support: function calls, GC activity, line execution 2016-09-09 17:37:37 -07:00
pydtrace.h mark dtrace stubs as static inline; remove stubs 2016-10-20 22:37:00 -07:00
pyerrors.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 15:04:59 +02:00
pyexpat.h
pyfpe.h remove trailing whitespace 2016-09-19 22:16:36 -07:00
pygetopt.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
pyhash.h replace Python aliases for standard integer types with the standard integer types (#17884) 2016-09-06 13:24:00 -07:00
pylifecycle.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
pymacconfig.h Minor spelling fixes 2016-08-20 08:03:06 +00:00
pymacro.h Add Py_MEMBER_SIZE macro 2016-09-08 09:33:56 -07:00
pymath.h Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
pymem.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 14:57:39 +02:00
pyport.h Merge 3.6 2017-01-05 22:59:11 +01:00
pystate.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
pystrcmp.h
pystrhex.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
pystrtod.h Issue #26331: Implement the parsing part of PEP 515. 2016-09-09 14:57:09 -07:00
Python-ast.h Issue #28008: Implement PEP 530 -- asynchronous comprehensions. 2016-09-09 10:36:01 -07:00
Python.h issue27186: add C version of os.fspath(); patch by Jelle Zijlstra 2016-06-04 12:06:26 -07:00
pythonrun.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 14:57:39 +02:00
pythread.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 14:57:39 +02:00
pytime.h Issue #28148: Stop using localtime() and gmtime() in the time module. 2016-09-28 17:31:35 -04:00
rangeobject.h
setobject.h
sliceobject.h
structmember.h Issue #28761: The fields name and doc of structures PyMemberDef, PyGetSetDef, 2016-11-22 07:58:08 +02:00
structseq.h Issue #28761: The fields name and doc of structures PyMemberDef, PyGetSetDef, 2016-11-22 07:58:08 +02:00
symtable.h Issue #28003: Implement PEP 525 -- Asynchronous Generators. 2016-09-08 22:01:51 -07:00
sysmodule.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
token.h
traceback.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
tupleobject.h
typeslots.h
ucnhash.h
unicodeobject.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 15:04:59 +02:00
warnings.h Issue #29058: All stable API extensions added after Python 3.2 are now 2016-12-27 14:57:39 +02:00
weakrefobject.h