CYTHON+

«Multi-core concurrent programming in Python»

The "Cython+" project aims at transferring the extremely powerful multi-core concurrent programming model of the golang language to the Python language by relying on scientific and technological approaches stemming from three decades of French know-how in the field of actor-based programming around Actalk. Cython+ is a strategic and highly visible project because Python, a universal use language of European origin, has the strongest market traction but is now facing competition from Google with golang.

Project summary

CYTHON+

The "Cython+" project aims to make the European programming language "Python" perform well on multi-core microprocessors, be energy efficient and launch a new open source compiler editor. It is based on "Cython", a superset of the "Python" language widely used in the field of artificial intelligence or scientific computing, and on three decades of French know-how in the field of concurrent object programming around Actalk. The "Cython+" project will make it possible to preserve the strategic position of the "Python" language, to strengthen its large ecosystem of European companies and to propose a competitive and sovereign alternative to Google's golang language, whose growing success threatens the leadership of "Python".

Project goals

The aim of the "Cython+" project is to ensure that all the cores of a microprocessor can be efficiently exploited with a program written in Python in the field of system or network programming, so as to correct the main shortcoming of the Python language and increase the competitiveness of its ecosystem. The envisaged approach consists in transferring the extremely powerful model of multi-core concurrent programming of the golang language to the Python language by relying on innovative scientific and technological approaches stemming from three decades of French know-how in the field of concurrent object programming around Actalk.

Cython is in fact a superset of the Python language that brings together the strong typing of Python, performance equivalent to C and a form of low-level parallelism well suited to scientific computing. It is with Cython that the  scikit-learn libraries or certain components of the NEO transactional distributed database are developed. Cython corrects the shortcomings of the Python language in terms of typing or performance. Cython also corrects the Global Interpreter Lock (GIL) problem, which is the cause of the poor support of multi-core microprocessors in Python.

In the "Cython+" project, we propose to remove the GIL in a very specific way: only at the level of asynchronous Cython functions that do not call Python objects. So nothing is changed in the Python language nor in the "CPython" runtime which is the reference implementation of the Python language in C. All programs already developed in Python remain compatible. We only modify the Cython compiler and the subpart of the Cython language disjoint from Python which we extend with a garbage collector and coroutines exploitable on a multi-core architecture.

Thus, "Cython+" will offer the same kind of coroutine programming as golang, the same level of parallelism, the same kind of memory management, the same kind of performance, exception handling that golang does not fully benefit from, a better concurrent programming model than go, a very well-stocked standard library with much broader community support, and guaranteed memory isolation between threads. "Cython+" will become an alternative to golang with many advantages, strengthening the community of the first European development language that Python has become.

Latest news

Publications

Source code

The source code of Cython+ can be found in the following directories:

Documentation

Ressources

This project has been selected to receive funding from the Structuring Projects for Competitiveness - N⁰ 1 Regions. It is supported by CapDigitial and the Île-de-France region.

 

Financé par BPI France  en coopération with Cap Digital  et la région Île-de-France