[Numpy-discussion] Half baked C API?

Ralf Juengling juenglin at cs.pdx.edu
Tue Mar 15 10:26:56 EST 2005

konrad.hinsen at laposte.net wrote:
 > How much do you expect to gain compared to a Python loop in such
 > a case?

I'd expect a factor 5 to 10.

 > Did you consider Pyrex? It lets you move from pure Python to pure C
 > with Python syntax, mixing both within a single function.

I looked at it, but haven't tried it out yet.
As far as I understand it, if I'd give Pyrex the example code in my
previous posting to translate it to C, the result would contain calls
to the Python interpreter to have it eveluate unknown functions like
'dot', 'sum' etc. That would be quite slow.

So besides having counterparts in the C API, the tool that does the
translation also needs to know about those.


More information about the NumPy-Discussion mailing list