3 ms·
Cython can wrap libraries but there are better alternatives for doing that. It is of most benefit when doing computation on NumPy arrays. That way you pass in a
by kevin_thibedeau 10y ago
Cython can wrap libraries but there are better alternatives for doing that. It is of most benefit when doing computation on NumPy arrays. That way you pass in and out native C objects, do bulk computation in compiled code, and never pay the penalty of accessing a PyObject. If you can't guarantee that then there is not much point in using Cython although you still do get a speedup on PyObject code by bypassing the bytecode interp.