[Numpy-discussion] Core math library in numpy

David Cournapeau cournape at gmail.com
Tue Feb 24 22:39:33 EST 2009


On Wed, Feb 25, 2009 at 3:26 AM, Charles R Harris
<charlesr.harris at gmail.com> wrote:

>
> Good point. However, most of the ufuncs involving standard functions like
> sin, cos, etc. are implemented as generic loops that are passed a function
> pointer and for such functions the call overhead is probably not significant
> in the absence of intrinsic hardware implementations. The complex functions
> could probably use some inlining as they call other functions. That could
> implemented by using some local static functions in the library code that
> could be inlined when the library is compiled.
>
> I think that the first priority should be correctness and portability. Speed
> optimizations can come later.

I agree. I can see plenty of advantages to force a function call - and
I have not seen any clear estimation of the function call cost. If it
is a burden, this can be improved later (AFAIK, inline is not a
modification of the signature).

David



More information about the NumPy-Discussion mailing list