Craig Citro, 28.06.2010 06:37:
> For instance, if you're planning on interfacing with a C library, and
> creating/manipulating some C/C++ data structures, then you should get
> basically the same performance
If you do a lot of calling between Python and library code, Cython code is
usually faster than the obvious C code. The difference shrinks when you
start doing a lot of heavy stuff in C, so that the call overhead gets
negligible. In that case, it only depends on how well the computational
code is tuned, which usually means that you have to do a lot more work in C
than what you'd have to do in Cython to get similar ("close enough")
results. Obviously, Cython code cannot be faster than C code for
computational code, but in most cases, it's not hard to get it so close
that a rewrite in C is no longer worth the effort.
Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev