Faster, more memory efficient and more ordered dictionaries on PyPy

Faster, more memory efficient and more ordered dictionaries on PyPy

https://morepypy.blogspot.com/2015/01/faster-more-memory-efficient-and-more.html

 https://en.wikipedia.org/wiki/Stackless_Python

Stackless Python, or Stackless, is a Python programming language interpreter, so named because it avoids depending on the C call stack for its own stack. In practice, Stackless Python uses the C stack, but the stack is cleared between function calls.[1] The most prominent feature of Stackless is microthreads, which avoid much of the overhead associated with usual operating system threads. In addition to Python features, Stackless also adds support for coroutines, communication channels and task serialization.

PyPy is a fastcompliant alternative implementation of the Python language (2.7.13 and 3.6.9). It has several advantages and distinct features:

  • Speed: thanks to its Just-in-Time compiler, Python programs often run faster on PyPy. (What is a JIT compiler?)

    “If you want your code to run faster, you should probably just use PyPy.” — Guido van Rossum (creator of Python)

  • Memory usage: memory-hungry Python programs (several hundreds of MBs or more) might end up taking less space than they do in CPython.

  • Compatibility: PyPy is highly compatible with existing python code. It supports cffi and can run popular python libraries like twisted and django.

  • Stackless: PyPy comes by default with support for stackless mode, providing micro-threads for massive concurrency.

  • As well as other features.

猜你喜欢

转载自www.cnblogs.com/yuanjiangw/p/11764761.html