[Numpy-discussion] Surprising performance tweak in Cython

Gael Varoquaux gael.varoquaux@normalesup....
Sun Jun 22 22:10:28 CDT 2008


On Sun, Jun 22, 2008 at 05:02:38PM -1000, Eric Firing wrote:
> The line above looks like a typo, and does not match your inline 
> version.  Could that be making the difference?

Thank you Eric! It was indeed a typo (the plot is nicer with the typo,
surprising, but that also explains why it didn't look exactly like the
weave version).

That doesn't explain the performance, however, as with the typo
corrected, the non-inlined version goes a bit faster: 110ms compared to
126ms. weave.inline is 62.5ms, surprisingly. Trying to understand the
difference between weave.inline and cython lead me to inlining, and to
the surprising result.

Thanks for your input,

Gaël


More information about the Numpy-discussion mailing list