[Numpy-discussion] Core math library in numpy

Pauli Virtanen pav@iki...
Tue Feb 24 11:12:37 CST 2009


Tue, 24 Feb 2009 14:04:42 +0000, Neal Becker 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).

Doesn't this require that the whole function body (not just the 
prototype) be included to the file using it? Or do current *linkers* do 
inlining? The core math library is compiled to a separate .o file, as the 
point is exactly to get rid of including c-files.

-- 
Pauli Virtanen



More information about the Numpy-discussion mailing list