4 ms·
I mainly programmed in Cython for a few years, and never came across standard Python code it wouldn't run. It's just usually only a few times faster than Python
by yesenadam 5y ago
I mainly programmed in Cython for a few years, and never came across standard Python code it wouldn't run. It's just usually only a few times faster than Python using unmodified Python, as opposed to 50x-200x faster or more with type annotations, GIL turned off for bottleneck functions, @ decorators etc.
I loved it, being able to float between Python and C in a program, writing in Python whatever was more convenient in Python, in C whatever was more convenient in C, or anywhere in between.
"While pure Python scripts can be compiled with Cython, it usually results only in a speed gain of about 20%-50%."
https://cython.readthedocs.io/en/latest/src/tutorial/pure.html https://cython.readthedocs.io/en/latest/src/tutorial/pure.ht...