in terms of comparing to numpy, how much overhead would there be from Python (vs. running the numpy C code alone)?
If you want to convert to Python lists its is going to take time. Not sure about Python arrays.
Edit: ha, found it https://news.ycombinator.com/from?site=github.com/dyu
As far as I can tell the FFI itself is not expensive as long as the underlying type does not have to be converted. But if you expect to call it millions of times a second you're going to have trouble. The solution is to move the loop inside the C code.
For example, suppose you want to FFT a bunch of signals. You don't repeatedly call FFT for each of the signals - you pass the entire data structure to the C code.