What’s new in PyPy2.7 5.10+¶
Big refactoring of some cpyext code, which avoids a lot of nonsense when calling C from Python and vice-versa: the result is a big speedup in function/method calls, up to 6 times faster.
Support tzinfo
field on C-API datetime objects, fixes latest pandas HEAD
Fix a corner case of mapdict: When an instance is used like a dict (using
setattr
and getattr
, or .__dict__
) and a lot of attributes are
added, then the performance using mapdict is linear in the number of
attributes. This is now fixed (by switching to a regular dict after 80
attributes).
When using cpyext, improve the speed of passing certain objects from PyPy to C code, most notably None, True, False, types, all instances of C-defined types. Before, a dict lookup was needed every time such an object crossed over, now it is just a field read.
Improve datetime + timedelta performance.
Improve way to describe memory
Allow compilaiton with Visual Studio 2017 compiler suite on windows
Refactor cpyext slots.
Speed up branchy code that does a lot of function inlining by saving one call to read the TLS in most bridges.
Refactor in rpython signatures
Store error state thread-locally in executioncontext, fixes issue #2764
Optimize Py*_Check for Bool, Float, Set. Also refactor and simplify W_PyCWrapperObject which is used to call slots from the C-API, greatly improving microbenchmarks in https://github.com/antocuni/cpyext-benchmarks
Fix two (unrelated) JIT bugs manifesting in the re module:
green fields are broken and were thus disabled, plus their usage removed from the _sre implementation
in rare “trace is too long” situations, the JIT could break behaviour arbitrarily.
Be more efficient about JIT hooks. Make it possible for the frontend to declare that jit hooks are currently not enabled at all. in that case, the list of ops does not have to be created in the case of the on_abort hook (which is expensive).
Improve speed of Python parser, improve ParseError messages slightly.
Work around possible bugs in upstream ioctl users, like CPython allocate at
least 1024 bytes for the arg in calls to ioctl(fd, request, arg)
. Fixes
issue #2776
Fix for python-level classes that inherit from C-API types, previously the w_obj was not necessarily preserved throughout the lifetime of the pyobj which led to cases where instance attributes were lost. Fixes issue #2793
Improve line offsets that are reported by SyntaxError. Improve error messages for a few situations, including mismatched parenthesis.
Fix a rare GC bug that was introduced more than one year ago, but was not diagnosed before issue #2752.
Introduce GC hooks, as documented in doc/gc_info.rst
Improve GC hooks
Update backend to 0.6.0 and support exceptions through wrappers