| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| | |
Based on patches by Christian Heimes and Vajrasky Kok
|
| | |
|
| |
| |
| |
| | |
Based on patches by Christian Heimes and Vajrasky Kok
|
| | |
|
| |
| |
| |
| |
| | |
This implements PEP 3121 module finalization as well. This change does not
cause any significant impact on performance.
|
| |
| |
| |
| |
| |
| |
| |
| | |
The limit is now 178,956,969 on 64 bit (it is greater on 32 bit because
structures are smaller).
Use int instead of Py_ssize_t to store the number of frames to have smaller
traceback_t objects.
|
| |
| |
| |
| | |
documentation. Use also the term "current" for the current size.
|
| |
| |
| |
| | |
Patch by Claudiu Popa.
|
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
comment
|
| |
| |
| |
| |
| |
| |
| |
| | |
Regression introduced by the implementation of the PEP 446 (non-inheritable
file descriptors by default).
master_fd must be set non-inheritable after the creation of the slave_fd,
otherwise grantpt(master_fd) fails with EPERM (errno 13).
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
name in their docstring. Patch written by Vajrasky Kok.
|
| |
| |
| |
| | |
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.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
affects
_decimal:
o Make all "mpd_t to C integer" conversion functions available in both the
64-bit and the 32-bit versions.
o Make all mixed mpd_t/C integer arithmetic functions available in the
32-bit version.
o Better handling of __STDC_LIMIT_MACROS for C++ users.
o Add struct tags (at the request of C++ users).
2) Check for libmpdec.so.2 if --with-system-libmpdec is used.
|
| | |
|
| |
| |
| |
| | |
the length doesn't fit in an DWORD
|
| | |
|
| | |
|
| |
| |
| |
| | |
Explain that unhandled error case is very unlikely
|
| | |
|
| |
| |
| |
| | |
for new allocations, but not when a memory block was already resized
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
for some builtins.
|
| |
| |
| |
| |
| | |
"format units" as legacy converters, as well as two new features:
"self converters" and the "version" directive.
|
| |
| |
| |
| | |
computes the stack effect of bytecode instructions.
|
| |
| |
| |
| |
| |
| | |
which anchor the pattern at both ends of the string to match.
Original patch by Matthew Barnett.
|
| |
| |
| |
| | |
Based on patch by Hugo Lopes Tavares.
|
| | |
|
| |
| |
| |
| | |
samples to little-endian and vice versa.
|
| |
| |
| |
| |
| | |
and warns about potential uninitialized use.
Silence that by initializing it to null.
|
|\ \ |
|
| |\ \ |
|