Desktop Site (Beta)

Introductory Video

FAST ASYNC CODE WITH CYTHON AND ASYNCIO

Loading

This joint talk by an async I/O expert and one of the Cython core developers explains how to write code with async/await in Python and Cython, and shows how to benefit from the excellent low-level features that Cython provides on top of Python.

Follow to receive video recommendations   a   A
Speaker: Are you the speaker?

Python has recently seen a fresh development boost around asynchronous applications, triggered by the addition of the asyncio library and the new async/await language features in Python 3.5, but coming from a world of well established tools like Twisted and Tornado. The Cython compiler, which compiles Python code to C, has accompanied and influenced this development. It provides full language support for async/await under all Python versions starting from 2.6, as well as native interoperability with existing Python code and the new Python coroutines in Python 3.5.

Benchmarks show that, while fully compatible, Cython compiled coroutines perform about 2-3x better than the same code executed in Python, but they additionally allow to interface natively with external C/C++ code, release the GIL, do parallel computation, and much more. All of this extends the applicable zone for asynchronous applications dramatically and can lead to better responsiveness and lower latency also for mostly I/O bound applications.

 



Editors Note:

I am looking for editors/curators to help with branches of the tree. Please send me an email  if you are interested.  

Comment On Twitter