[SciPy-User] Cython vs Vectorized Numpy vs MATLAB

Yury V. Zaytsev yury@shurup....
Fri Nov 18 04:15:12 CST 2011


On Wed, 2011-11-16 at 05:45 +0530, Jaidev Deshpande wrote:
> Although, please note that I used Cython on the vectorized code *as it
> is*, without adding static types. I know, stupid thing to do, but
> shouldn't it have given me *some *speed-up?

> Vectorized NumPy
> takes.................................................
>  1.0342 second
> The above,
> Cythonized ...................................................
> 0.997 seconds 

It did give you *some* speed-up, didn't it?

Why would you expect more, if all you are doing is calling Python
primitives directly via Cython-compiled code instead of parsing the
Python file and byte-compiling it first?

-- 
Sincerely yours,
Yury V. Zaytsev




More information about the SciPy-User mailing list