I love seeing Cython usage. Python is cool, but as a scientific language, its slowness gets in the way sometimes. Particularly when you have control flow with funny shapes, so it is hard to just apply multipurpose vectorized functions. In my experience, NLP often has funny shapes like that.
Cython is a wonderful escape hatch to grab performance, and I'd love to see it used more casually in the data science world.
Cython is compiled C that uses CPythons objects. If you can distill your algorithm to a full C(ython) implementation, you get CPython objects + C code, which is then compiled with the (appropriate version of the) system compiler.
Cython is a wonderful escape hatch to grab performance, and I'd love to see it used more casually in the data science world.