[Numpy-discussion] Surprising performance tweak in Cython
Sun Jun 22 23:55:16 CDT 2008
On Sun, Jun 22, 2008 at 06:39:21PM -1000, Eric Firing wrote:
> Another typo is the culprit:
> In :timeit do_Mandelbrot_cython()
> 10 loops, best of 3: 53.8 ms per loop
> In :timeit do_Mandelbrot_cython2()
> 10 loops, best of 3: 54 ms per loop
> This is after I put the underscore in the x_buffer declaration in
> do_Mandlebrot_cython2. As it was, with no underscore, x_buffer was
> being treated as a python double.
Indeed, I was looking for a forgotten type definition, but I forgotten to
look for typos in the type definitions. As a results, the cython code is
now of comparable speed to the weave.inline: cython=59ms and weave=62.5ms
on my box.
Thanks a lot, next time I'll now where to look.
More information about the Numpy-discussion