| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
coroutines (#644)
|
| |
|
|
|
| |
Based on patch by Vajrasky Kok.
|
| |
|
|
|
| |
The docstring did not properly represent the fact that the argument to int() was positional-only.
|
|
|
|
| |
PyBool_FromLong(0)/PyBool_FromLong(1). (#567)
|
|
|
|
| |
"%%" in the format string for classic string formatting. (GH-513)
|
| |
|
| |
|
|
|
|
| |
and tuple(). (#518)
|
|
|
|
| |
bytes inside. (GH-499)
|
| |
|
|
|
|
| |
int(), bool(), float(), list() and tuple(). Specify the value as a
positional argument instead.
|
|
|
|
|
|
|
|
| |
allocated.
On PyMem_Realloc failure, _PyCode_SetExtra should free co_extra if
co_extra->ce_extras could not be allocated.
On PyMem_Realloc success, _PyCode_SetExtra should set all unused slots in
co_extra->ce_extras to NULL.
|
|
|
| |
It should raise TypeError when kwargs is not a dict.
|
|
|
|
| |
Add a comment to prevent further attempts to avoid a copy for
optimization.
|
| |
|
|
|
|
| |
PyObject_GetAttrString intern temporary key string.
It's completely redudant.
|
|
|
|
|
|
| |
* Fix incorrect handling of signed zeros for complex-related classes.
* Add Misc/NEWS entry.
|
|
|
|
| |
lookdict_unicode() and lookdict_unicode_nodummy() may raise exception
when key is not unicode.
|
|
|
|
| |
weakref objects (#128)
|
| |
|
|
|
|
|
|
|
|
|
| |
* Move all functions to call objects in a new Objects/call.c file.
* Rename fast_function() to _PyFunction_FastCallKeywords().
* Copy null_error() from Objects/abstract.c
* Inline type_error() in call.c to not have to copy it, it was only
called once.
* Export _PyEval_EvalCodeWithName() since it is now called
from call.c.
|
| |
|
|
|
|
|
| |
Sorry, I didn't want to push this change before the review :-( I was pushing a
change into the 2.7 branch.
|
|
|
|
|
|
|
|
|
|
| |
* Move all functions to call objects in a new Objects/call.c file.
* Rename fast_function() to _PyFunction_FastCallKeywords().
* Copy null_error() from Objects/abstract.c
* Inline type_error() in call.c to not have to copy it, it was only
called once.
* Export _PyEval_EvalCodeWithName() since it is now called
from call.c.
|
|
|
|
| |
is_size_t test was reversed. Bug spotted by INADA Naoki.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #29507: Optimize slots calling Python methods. For Python methods, get
the unbound Python function and prepend arguments with self, rather than
calling the descriptor which creates a temporary PyMethodObject.
Add a new _PyObject_FastCall_Prepend() function used to call the unbound Python
method with self. It avoids the creation of a temporary tuple to pass
positional arguments.
Avoiding temporary PyMethodObject and avoiding temporary tuple makes Python
slots up to 1.46x faster. Microbenchmark on a __getitem__() method implemented
in Python:
Median +- std dev: 121 ns +- 5 ns -> 82.8 ns +- 1.0 ns: 1.46x faster (-31%)
Co-Authored-by: INADA Naoki <songofacandy@gmail.com>
|
|
|
|
|
|
|
| |
Issue #29259, #29465: PyCFunction_Call() doesn't create anymore a redundant
tuple to pass positional arguments for METH_VARARGS.
Add a new cfunction_call() subfunction.
|
|
|
|
| |
Issue #29306: Destroy argstuple and kwdict if Py_EnterRecursiveCall() fails.
|
|
|
|
|
|
|
| |
* *PyCFunction_*Call*() functions now call Py_EnterRecursiveCall().
* PyObject_Call() now calls directly _PyFunction_FastCallDict() and
PyCFunction_Call() to avoid calling Py_EnterRecursiveCall() twice per
function call
|
|
|
|
| |
_PyArg_NoPositional() now are macros.
|
|
|
|
|
|
|
| |
Decreased density gives better collision statistics (average of 2.5 probes in a
full table versus 3.0 previously) and fewer occurences of starting a second
possibly overlapping sequence of 10 linear probes. Makes resizes a little more
frequent but each with less work (fewer insertions and fewer collisions).
|
| |
|
|
|
|
| |
Calling builtin method is at most 10% faster.
|
|
|
|
|
| |
* so->used never gets changed during a resize
* so->filled only changes when dummies are present and being eliminated
|
|
|
|
| |
(10-20% for small integers).
|
|
|
|
| |
Based on patch by Vajrasky Kok.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
add_methods(), add_members(), and add_getset() used PyDict_SetItemString()
to register descriptor to the type's dict.
So descr_new() and PyDict_SetItemString() creates interned unicode from same
C string.
This patch takes interned unicode from descriptor, and use PyDict_SetItem()
instead of PyDict_SetItemString().
python_startup_no_site:
default: Median +- std dev: 12.7 ms +- 0.1 ms
patched: Median +- std dev: 12.5 ms +- 0.1 ms
|
| |
|
|\
| |
| |
| |
| |
| | |
a macro if Py_LIMITED_API is not set or set to the value between 0x03050400
and 0x03060000 (not including) or 0x03060100 or higher. Added functions
PySlice_Unpack() and PySlice_AdjustIndices().
|
| |\
| | |
| | |
| | |
| | | |
Py_LIMITED_API is not set or set to the value between 0x03050400
and 0x03060000 (not including) or 0x03060100 or higher.
|
| | |
| | |
| | |
| | |
| | | |
Py_LIMITED_API is not set or set to the value between 0x03050400
and 0x03060000 (not including) or 0x03060100 or higher.
|
| | |
| | |
| | |
| | | |
methods.
|
|\ \ \
| |/ /
| | |
| | | |
Warnings could be emitted at compile time.
|
| |\ \
| | |/
| | |
| | | |
Warnings could be emitted at compile time.
|
| | |
| | |
| | |
| | | |
Warnings could be emitted at compile time.
|
| | |
| | |
| | |
| | |
| | | |
Remove two assertions which can fail on legit code. Keyword arguments are
checked later with better tests and raise a regular (TypeError) exception.
|
| | | |
|
| | |
| | |
| | |
| | | |
possible but Coccinelle couldn't find opportunity.
|