
March 15, 2005
10:26 a.m.
konrad.hinsen@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. Ralf