Den 11.06.2010 09:14, skrev Sebastien Binet:
> it of course depends on the granularity at which you wrap and use
> numpy-core but tight loops calling ctypes ain't gonna be pretty
> performance-wise.
>    

Tight loops in Python are never pretty.

The purpose of vectorization with NumPy is to avoid tight Python loops.

> I really think using cython would be a better option.
> one'd get the python2<->  python3 transition for "free".
>
>    

Perhaps. Cython has nice syntax for PEP 3118 buffers. But there are 
downsides to this:
- Cython is not C. We want the core to be a C library independent of Python.
- Cython depends on CPython.
- Compiling Cython generated C takes time.
- Linkage can be a PITA (I use 64-bit Python now, and import libraries 
for gcc are missing.)

Sturla

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to