[Numpy-discussion] Core math library in numpy
Charles R Harris
Tue Feb 24 12:26:47 CST 2009
On Tue, Feb 24, 2009 at 11:09 AM, Matthieu Brucher <
> In fact, the __inline is not helpful. It's the static keyword that
> enables the compiler to inline the function if the function is small
> enough. As the static indicates that the function will not be seen
> from the outside, it can do this.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion