PyPy

from Wikipedia, the free encyclopedia
PyPy

Pypy logo.png
Basic data

developer Armin Rigo, Samuele Pedroni, Christian Tismer, Holger Krekel u. a.
Publishing year 2002
Current  version 7.2.0
( October 14, 2019 )
operating system Windows , macOS , Linux , FreeBSD , etc. v. m.
programming language Python , RPython
category Just-in-time compiler
License MIT license
pypy.org

PyPy is a just-in-time compiler for the Python programming language , written in Python itself. Because programmers can experiment with a Python implementation in Python itself (and not in C , as is the case with the CPython reference implementation ), PyPy makes it easier to find areas where the Python implementation can be improved. In addition, PyPy's flexibility allows developers to experiment with multiple implementations of a particular feature. One of the goals of the project was to develop a Python interpreter that is faster than CPython , which was first achieved in March 2008. Meanwhile, PyPy is faster than CPython in a majority of benchmarks - and in special cases even faster than C.

Strictly speaking, PyPy does not accept programs in Python, but a reduced language called RPython. While all RPython programs can run as Python programs without conversion, the reverse is not always the case. The reduction to RPython became necessary so that PyPy can carry out a static typing of Python objects. PyPy is advantageous when the runtime of Python programs is to be reduced. The disadvantage is that not all program libraries developed for Python are supported.

Components

PyPy consists of two main components:

  1. the Standard Interpreter , an implementation of a Python interpreter in a limited subset of Python .
  2. a RPython - toolchain , which is capable of the aforementioned subset of Python in assembler to translate code. This code is then executed directly on the processor instead of in software.

Development history

From version 1.2 on there is a JIT compiler , which partially executes code consisting mainly of integer arithmetic much faster than Psyco .

PyPy was funded by the European Union in a research framework program. Funding expired in the first quarter of 2007 after 28 months.

While version 1.0 mainly bundled the results of the EU research project, version 1.1 focuses on compatibility with CPython 2.5 as well as stability and freedom from errors. Version 1.5 is compatible with Python 2.7. Version 1.5 is said to be 25% faster than the previous version.

From version 2.1 onwards, the software can be run on the ARM architecture .

From version 2.3 PyPy supports the OpenBSD operating system , from version 2.3.1 PyPy also supports Python 3 and from version 2.4 Python 2.7.8 is supported as the standard library .

To stand out from the current versions of the Python - interpreter CPython better to differentiate PyPy jumped after the release of version 2.4 to version 4.0. The most important innovation of this version was support for SIMD .

The current version 6.0 enables developers to use hooks to gain insight into the computing power of automatic garbage collection.

See also

Web links

Individual evidence

  1. morepypy.blogspot.com . (accessed October 24, 2019).
  2. FreshPorts - lang / pypy . Retrieved March 8, 2017.
  3. The PyPy Open Source Project on Open Hub: Languages Page . In: Open Hub . (accessed on September 26, 2018).
  4. ^ Maciej Fijalkowski: As fast as CPython (for carefully taken benchmarks). March 2008, accessed February 26, 2017 .
  5. How fast is PyPy? Retrieved February 26, 2017 (English).
  6. E.g. when PyPy loads functions from external files; these are then included in the main program. However, a static compiler like C does not usually integrate functions from external files. PyPy faster than C on a carefully crafted example. In: morepypy blog. February 4, 2011, accessed August 27, 2018 .
  7. Speed ​​Center
  8. ^ PyPy EU project page . Retrieved October 17, 2013.
  9. PyPy 1.1: Compatibility & Consolidation. Retrieved February 26, 2017 (English).
  10. PyPy 1.5 Released: Catching Up. Retrieved February 26, 2017 (English).
  11. PyPy 1.5 catches up with CPython 2.7.1. Retrieved May 10, 2011 .
  12. PyPy 2.1 - Considered ARMful. August 1, 2013, accessed on August 15, 2018 .
  13. PyPy 2.3. Retrieved August 15, 2018 .
  14. PyPy can also use Python 3 after the update. Accessed August 15, 2018 .
  15. PyPy 2.4. June 23, 2014, accessed August 15, 2018 .
  16. Structural changes accelerate PyPy 2.4. September 24, 2014, accessed August 15, 2018 .
  17. CPython-Altenative PyPy 4.0.0 supports SIMD vectorization. October 30, 2015, accessed August 15, 2018 .
  18. PyPy 6.0 relies on performance and compatibility. April 27, 2018. Retrieved August 15, 2018 .
  19. PyPy2.7 and PyPy3.5 v6.0 dual release. Retrieved August 15, 2018 .