3 ms·
Indeed. It is pretty easy to just write some Cython routine against the data pointer & range lifted out of some NumPy array and then still let Python do all th
by cb321 3y ago
Indeed. It is pretty easy to just write some Cython routine against the data pointer & range lifted out of some NumPy array and then still let Python do all the memory management for you.
I think Cython is great for just speeding up profiling-revealed hot spots. And `cython --annotate` is even a nice helper along that path. { In fact, I think gcc should have a similar system one could integrate so that you can click-expand the Python to get the C and then click again the C to get the assembly. :-) } It really makes Python more like the gradually typed system Common Lisp always was.
In fact, there was talk back in the very early noughties of bundling a precursor of Cython with the Python interpreter itself. I was always a bit disappointed that didn't go very far. Ah well.