BT

Python JIT Compiler PyPy 4 Brings SMD Vectorization, Performance Improvements, and more

| by Sergio De Simone Follow 14 Followers on Nov 03, 2015. Estimated reading time: 1 minute |

PyPy 4.0 is a new major version of Python Just-in-Time compiler, bringing many new features, such as SIMD vectorization support, warmup time improvements, and improvements to Numpy. PyPy claims to be more than six times faster than CPython.

PyPy 4 SIMD vectorization takes place while tracing running code and automatically detects availability of SIMD hardware to enhance common vector and matrix operations. According to the announcement, just-in-time vectorization has some advantages over ahead-of-time vectorization in that it can more easily detect possible vectprizations.

On the performance front, PyPy internals were refactored to more efficiently use guards, which brings a 20% memory consumption reduction, and improve unrolling, which reduces warmup time by 20%.

Numpy is PyPy equivalent of Python’s NumPy extension. Python’s NumPy has been mentioned as one of the reason taking back more developers from using PyPy. In PyPy 4.0, Numpy brings extended support for ndarray and numeric dtypes, which are deemed close to feature-complete. Support for record, string and unicode dtypes has also improved.

PyPy 4.0 aims to be compliant with CPython 2.7. Lack of support for Python 3 is often considered a limiting factor for PyPy adoption. In fact, PyPy3 is compatible with Python 3.2.5, and the PyPy team is trying to kickstart Python 3.4 support.

Other two factors that should be taken into consideration before moving to PyPy are the lack of equivalent implementations for several C Python extensions such as Pandas, SciPy, etc., which can make CPython be faster than PyPy when such extensions are used; additionally, PyPy brings most of its JIT compiler advantages with long running scripts, while for simple and small scripts, warmup times may slow it down.

More details about PyPy 4.0 can be found in its announcement. PyPy 4 can be downloaded here.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT