Cython 3.0 and Nuitka 1.7 Released

New Release of Cython 3.0 Enhances Performance and Compatibility

After five years of development, the project Cython has announced the release of Cython 3.0, a compiler for Python and Cython languages. This new version of the compiler allows Python code to be translated into C/C++ languages, opening up additional possibilities for code interaction between Python and other languages. Cython is particularly useful for creating Python-context around language libraries and for creating modules on SI, which significantly accelerates the performance of Python code. The compiler itself is written in Python and is available under the Apache 2.0 license, making it accessible to a wide range of developers.

Cython is an extended Python language option that simplifies the integration of SI code and enables the creation of SI extensions for Python projects as easily as writing Python code. It expands Python capabilities by allowing functions to be called in SI, supporting variables with SI types, and compiling the final Cython code using a standard system compiler. By leveraging the advanced features of Cython, code compiled with this language can achieve significant efficiency gains.

The performance of Python code is substantially improved when using Cython. Benchmarks using the Pybench package show that Cython can achieve approximately 30% higher performance compared to Cpython. In some cases, speed increases of 60-90% can be achieved, especially when executing if-elif-else operations or during cycles. Code that heavily uses Cython SI types, such as lists, dictionaries, and strings, can experience speedups of several times, while numerical calculations with static types can achieve acceleration of 100-1000 times. This feature allows critical sections of Python code to be significantly accelerated, especially when using static SI types.

The new release of Cython 3.0 introduces a change in the numbering scheme of versions. Instead of following the previous system of semantic versioning, where the next release would be labeled 0.30, the project has adopted the X.Y.Z versioning format. Release 3.0.0 marks a significant change in functionality and compatibility, which is reflected in the new versioning scheme.

Overall, the release of Cython 3.0 offers developers improved performance and compatibility, making it an essential tool for enhancing Python code efficiency and integration with other languages.

/Reports, release notes, official announcements.