Hi<div><br></div><div>I need to perform cubic spline interpolation over a range of points, and I have written the code for the same in C and in Python.</div><div><br></div><div>The interpolation is part of a bigger project. I want to front end for the project to be Python. Ideally I want Python only to deal with data visualization and i/o, and I&#39;ll leave the computationally expensive part of the project to C extensions, which can be imported as functions into Python.</div>

<div><br></div><div>To this end, the interpolation can be handled in two ways:</div><div><br></div><div>1. I can either compile the C code into a module using the Python-C/C++ API, through which I can simple &#39;import&#39; the required function.</div>

<div>2. I can use the Python code and extend it using Cython.</div><div><br></div><div>Which will give me a better performance?</div><div><br></div><div>Thanls</div>