[Numpy-discussion] Core math library in numpy

David Cournapeau cournape@gmail....
Tue Feb 24 21:39:33 CST 2009


On Wed, Feb 25, 2009 at 3:26 AM, Charles R Harris
<charlesr.harris@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