What’s new in PyPy 4.0.0

Improve the performance of dict.update() and a bunch of methods from sets, by reusing the hash value stored in one dict when inspecting or changing another dict with that key.

A major refactoring of the ResOperations that kills Box. Also rewrote unrolling to enable future enhancements. Should improve warmup time by 20% or so.

Optimize common sequences of operations like int_lt/cond_call in the JIT backends

Fix for missing headers in OpenBSD, already applied in downstream ports

Remove a source of non-incremental-ness in the GC: now external_malloc() no longer runs gc_step_until() any more. If there is a currently-running major collection, we do only so many steps before returning. This number of steps depends on the size of the allocated object. It is controlled by tracking the general progress of these major collection steps and the size of old objects that keep adding up between them.

Reenable jithooks

Issue #2141: fix a crash on Windows and OS/X and ARM when running at least 20 threads.

Add support for ndarray.ctypes property.

Share guard resume data between consecutive guards that have only pure operations and guards in between.

Fix performance regression on operations mixing numpy scalars and Python floats, cf. issue #2148.

Win32: support __stdcall in CFFI.

Refactorings of annotation and rtyping of function calls.

Allow creation of fortran-ordered ndarrays

Remove some remnants of the old ootypesystem vs lltypesystem dichotomy.

ffi.new_handle() returns handles that work more like CPython’s: they remain valid as long as the target exists (unlike the previous version, where handles become invalid before the __del__ is called).

allow automatic casting in ufuncs (and frompypyfunc) to cast the arguments to the allowed function type declarations, fixes various failures in linalg CFFI functions

A new optimization pass to use emit vectorized loops

The PowerPC JIT backend is merged.

Improve the performance of simple trace functions by lazily calling fast2locals and locals2fast only if f_locals is actually accessed.