[Numpy-discussion] Core math library in numpy
Charles R Harris
charlesr.harris@gmail....
Tue Feb 24 11:21:42 CST 2009
On Tue, Feb 24, 2009 at 7:04 AM, Neal Becker <ndbecker2@gmail.com> wrote:
> Pauli Virtanen <pav <at> iki.fi> writes:
>
> ...
> > One question: doesn't this add one extra function call to all umath
> > functions? Could we do '#define npy_XXX XXX' in the npy_math.h header
> > when the appropriate platform-specified functions are available?
>
> There shouldn't be overhead on modern compilers for simple functions. On
> gcc
> use __inline__ should eliminate overhead (also, -O3 should automatically
> inline).
>
In order to inline, the function definition would need to be in the header
and a library version would still be required for passing functions by
address or in case the compiler decided *not* to inline.
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20090224/6d31910b/attachment.html
More information about the Numpy-discussion
mailing list