| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #29452: Use METH_FASTCALL calling convention for index(), insert() and
rotate() methods of collections.deque to avoid the creation a temporary tuple
to pass position arguments. Speedup on deque methods:
* d.rotate(): 1.10x faster
* d.rotate(1): 1.24x faster
* d.insert(): 1.18x faster
* d.index(): 1.24x faster
|
|
|
|
| |
_PyArg_NoPositional() now are macros.
|
| |
|
|\ |
|
| |\ |
|
| |\ \ |
|
| |\ \ \
| | | | |
| | | | |
| | | | | |
the match object. Based on patch by WGH.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Based on patch by Georg Brandl.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Original patch by Georg Brandl.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Issue #29300: Rename struct.unpack() second parameter from "inputstr" to
"buffer", and use the Py_buffer type.
Fix also unit tests on struct.unpack() which passed a Unicode string instead of
a bytes string as struct.unpack() second parameter. The purpose of
test_trailing_counter() is to test invalid format strings, not to test the
buffer parameter.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* The struct module now requires contiguous buffers.
* Convert most functions and methods of the _struct module to Argument Clinic
* Use "Py_buffer" type for the "buffer" argument. Argument Clinic is
responsible to create and release the Py_buffer object.
* Use "PyStructObject *" type for self to avoid explicit conversions.
* Add an unit test on the _struct.Struct.unpack_from() method to test passing
arguments as keywords.
* Rephrase docstrings.
* Rename "fmt" argument to "format" in docstrings and the documentation.
As a side effect, functions and methods which used METH_VARARGS calling
convention like struct.pack() now use the METH_FASTCALL calling convention
which avoids the creation of temporary tuple to pass positional arguments and
so is faster. For example, struct.pack("i", 1) becomes 1.56x faster (-36%)::
$ ./python -m perf timeit \
-s 'import struct; pack=struct.pack' 'pack("i", 1)' \
--compare-to=../default-ref/python
Median +- std dev: 119 ns +- 1 ns -> 76.8 ns +- 0.4 ns: 1.56x faster (-36%)
Significant (t=295.91)
Patch co-written with Serhiy Storchaka.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
_Pickle_FastCall() has a surprising API: it decrements the reference counter of
its second argument.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
method when unpickle collections.deque and other list-like objects.
This can speed up unpickling to 2 times.
|
| | |\ \ \ |
|
| | | |\ \ \ |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
possible but Coccinelle couldn't find opportunity.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
possible. Patch is writen with Coccinelle.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
is now of type "const char *" rather of "char *".
|
| | | | |\ \ \ |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Patch by Tal Einat.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Patch by Tal Einat.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
in socket.sendto(). A PyErr_Occurred() check was happening later, but
it is better to just use the return value and not call PyErr_Occurred().
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling
convention for functions using "boring" positional arguments.
Manually fix _elementtree: _elementtree_XMLParser_doctype() must remain
consistent with the clinic code.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling
convention for functions using only positional arguments.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Issue #29286.
|
| | | | |\ \ \ \ |
|
| | | | |\ \ \ \ \ |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
in methods of regular expression objects.
|
| | | | |\ \ \ \ \ \ |
|
| | | | | | | | | | | |
|
| | | | | |\ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
KeyError could be raised when cached function with full cache was
simultaneously called from differen threads with the same uncached arguments.
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
so let's defer this until 3.7, 3.8, ... all have this new function.
|
| | | | | |\ \ \ \ \ \ \ |
|
| | | | | | |\ \ \ \ \ \ \ |
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
|
| | | | | | | |\ \ \ \ \ \ \ |
|
| | | | | | | |\ \ \ \ \ \ \ \ |
|
| | | | | | | |\ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
maintenance issues (cost/benefit).
|
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
path in order to avoid maintenance issues.
|