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

Fast Async Code with Cython and AsyncIO

Formal Metadata

Title
Fast Async Code with Cython and AsyncIO
Title of Series
Part Number
22
Number of Parts
169
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date2016
LanguageEnglish

Content Metadata

Subject Area
Genre
Abstract
Stefan Behnel - Fast Async Code with Cython and AsyncIO Learn how to use the new async/await language feature to write asynchronous code in Python and [Cython]. See how to benefit from the excellent low-level features that Cython provides to speed up or parallelise your code, interface natively with external C/C++ code, and achieve better responsiveness and lower latency also in mostly I/O bound applications. ----- 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. This joined 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.