We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Opening PyPy's magic black box

Formale Metadaten

Titel
Opening PyPy's magic black box
Untertitel
A deep dive into the JIT
Serientitel
Anzahl der Teile
118
Autor
Lizenz
CC-Namensnennung - keine kommerzielle Nutzung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache

Inhaltliche Metadaten

Fachgebiet
Genre
Abstract
PyPy is a fast and compliant implementation of Python. In other words, it's an interpreter for the Python language that can act as a full replacement for the reference interpreter, CPython. It's optimised to enable efficient just-in-time (JIT) compilation of Python code to machine code, and has releases matching versions 2.7, and 3.6. It now also supports the main pillars of the scientific ecosystem (numpy, Cython, scipy, pandas, ...) thanks to its emulation layer for the C API of CPython. The PyPy JIT is often just described as ""magically running your code faster"", but is actually what is known as a ""meta-tracing JIT"". A tracing JIT optimises loops by recording and optimising a single, hopefully representative, execution of the loop. While crude, that approach is known to be effective for just-in-time compiler. Additionally, PyPy's JIT is ""meta"" in the sense that it traces the execution of the interpreter while it runs some user-code instead of tracing the user-code directly. This again simplifies the compiler. We will explore how all this works together and is implemented (spoiler: it's Python all the way down!). This talk assumes no prior knowledge of compiler theory nor of PyPy internals, and should be of interest to anybody who wishes that their pure-Python code would run faster. The audience will gain a firmer understanding of how PyPy operates and optimises code, and how to how to get the most out of the PyPy JIT.
Schlagwörter