| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | | |
__module__ attribute less slow.
|
| | |
| | |
| | |
| | | |
expressions.
|
| | |
| | |
| | |
| | |
| | | |
test checking for integer overflow on Py_ssize_t type: cast explicitly to
size_t.
|
| | |
| | |
| | |
| | | |
a temporary bytearray object.
|
|/ /
| |
| |
| | |
Modules/_pickle.c.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
annotate text signatures in docstrings, resulting in fewer false
positives. "self" parameters are also explicitly marked, allowing
inspect.Signature() to authoritatively detect (and skip) said parameters.
Issue #20326: Argument Clinic now generates separate checksums for the
input and output sections of the block, allowing external tools to verify
that the input has not changed (and thus the output is not out-of-date).
|
| |
| |
| |
| | |
file.
|
| |
| |
| |
| | |
function.
|
| | |
|
| |
| |
| |
| |
| |
| | |
PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
|
| |
| |
| |
| |
| | |
docstring for __new__ and __init__, and always use "goto exit" instead of
returning "NULL" for failure to parse (as _new__ and __init__ return ints).
|
| |
| |
| |
| | |
__init__ functions.
|
| |
| |
| |
| | |
delaying its output or even redirecting it to a separate file.
|
| |
| |
| |
| | |
methods.
|
| |
| |
| |
| | |
to improve readability.
|
| |
| |
| |
| | |
take two parameters.
|
| |
| |
| |
| | |
is used in a program.
|
| |
| |
| |
| |
| |
| |
| | |
Initial patch by Merlijn van Deen.
I've added a few unrelated docstring fixes in the patch while I was at
it, which makes the documentation for pickle a bit more consistent.
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
PyTuple_New(0) always returns the same empty tuple from its free list anyway,
so we are not saving much here. Plus, the code where this was used is on
uncommon run paths.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I have noticed a race-condition occurring on one of the buildbots because of
this optimization. The function called may release the GIL which means
multiple threads may end up accessing the shared tuple. I could fix it up by
storing the tuple to the Pickler and Unipickler object again, but honestly it
really not worth the trouble.
I ran many benchmarks and the only time the optimization helps is when using a
fin-memory file, like io.BytesIO on which reads are super cheap, combined with
pickle protocol less than 4. Even in this contrived case, the speedup is a
about 5%. For everything else, this optimization does not provide any
noticable improvements.
|
| |
| |
| |
| |
| | |
This implements PEP 3121 module finalization as well. This change does not
cause any significant impact on performance.
|
| |
| |
| |
| |
| | |
I fixed the bug that was in my previous attempt of this cleanup. I ran
the full test suite to verify I didn't introduce any obvious bugs.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Also, replace unnessary uses of the #if preprocessor directive.
|
| | |
|
| |
| |
| |
| |
| |
| | |
This doesn't make any functional changes to the exisiting implementation. The
conversion did help however uncover documentation bugs. The best thing about
this conversion is less C code to maintain by hand.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This will allow us to control in the future whether to use framing or not.
For example, we may want to turn it off for tiny pickle where it doesn't
help.
The change also improves performance slightly:
### fastpickle ###
Min: 0.608517 -> 0.557358: 1.09x faster
Avg: 0.798892 -> 0.694738: 1.15x faster
Significant (t=3.45)
Stddev: 0.17145 -> 0.12704: 1.3496x smaller
Timeline: http://goo.gl/3xQE1J
### pickle_dict ###
Min: 0.669920 -> 0.615271: 1.09x faster
Avg: 0.733633 -> 0.645058: 1.14x faster
Significant (t=5.05)
Stddev: 0.12041 -> 0.02961: 4.0662x smaller
Timeline: http://goo.gl/LpLSXI
### pickle_list ###
Min: 0.397583 -> 0.368112: 1.08x faster
Avg: 0.412784 -> 0.397223: 1.04x faster
Significant (t=2.78)
Stddev: 0.01518 -> 0.03653: 2.4068x larger
Timeline: http://goo.gl/v39E59
### unpickle_list ###
Min: 0.692935 -> 0.594870: 1.16x faster
Avg: 0.730012 -> 0.628395: 1.16x faster
Significant (t=17.76)
Stddev: 0.02720 -> 0.02995: 1.1012x larger
Timeline: http://goo.gl/2P9AEt
The following not significant results are hidden, use -v to show them:
fastunpickle.
|
| | |
|
| |
| |
| |
| |
| | |
and warns about potential uninitialized use.
Silence that by initializing it to null.
|
| |
| |
| |
| | |
CID 1131946: Unchecked return value (CHECKED_RETURN)
|
|\ \ |
|
| | | |
|
|/ / |
|
| |
| |
| |
| | |
CID 1131949: Dereference null return value (NULL_RETURNS)
|
| |
| |
| |
| | |
Most of the work is by Alexandre.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
error handling
The following code didn't handle correctly the failure of
PyUnicode_InternFromString("__name__").
if (newobj_str == NULL) {
newobj_str = PyUnicode_InternFromString("__newobj__");
name_str = PyUnicode_InternFromString("__name__");
if (newobj_str == NULL || name_str == NULL)
return -1;
}
|