[SciPy-User] Cython vs Vectorized Numpy vs MATLAB

Jaidev Deshpande deshpande.jaidev@gmail....
Fri Nov 18 10:39:53 CST 2011


Haha, thanks :)

Yeah, I guess that's not how Cython works. I think I'll go and read a
little bit more about NumPy and Cython.

Thanks again!

On Fri, Nov 18, 2011 at 3:45 PM, Yury V. Zaytsev <yury@shurup.com> wrote:

> 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
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20111118/f1947757/attachment.html 


More information about the SciPy-User mailing list