Cython is an actively used programming language created in 2007. Cython is a superset of the Python programming language, designed to give C-like performance with code which is mostly written in Python. Cython is a compiled language that generates CPython extension modules. These extension modules can then be loaded and used by regular Python code using the import statement. Read more on Wikipedia...
- Cython ranks in the top 10% of languages
- the Cython website
- the Cython wikipedia page
- Cython first appeared in 2007
- file extensions for Cython include pyx, pxd and pxi
- See also: python, c, linux, pyrex, sagemath, xml, scipy, pandas, scikit-learn
- I have 45 facts about Cython. what would you like to know? email me and let me know how I can help.
Example code from Wikipedia:
In : %load_ext Cython In : %%cython ...: def f(n): ...: a = 0 ...: for i in range(n): ...: a += i ...: return a ...: ...: cpdef g(int n): ...: cdef int a = 0, i ...: for i in range(n): ...: a += i ...: return a ...: In : %timeit f(1000000) 42.7 ms ± 783 µs per loop (mean ± std. dev. of 7 runs, 10 loops each) In : %timeit g(1000000) 74 µs ± 16.6 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)
Last updated July 22nd, 2019