[Numpy-discussion] Core math library in numpy

Charles R Harris charlesr.harris at gmail.com
Tue Feb 24 12:21:42 EST 2009


On Tue, Feb 24, 2009 at 7:04 AM, Neal Becker <ndbecker2 at 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://mail.python.org/pipermail/numpy-discussion/attachments/20090224/6d31910b/attachment.html>


More information about the NumPy-Discussion mailing list