On Apr 9, 1:18 pm, Tom Boothby <tomas.boot...@gmail.com> wrote:
> This shouldn't really come as a surprise.  From the Cython documentation,
>
> "This is about 20 times slower, but still about 10 times faster than
> the original Python-only integration code. This shows how large the
> speed-ups can easily be when whole loops are moved from Python code
> into a Cython module."

Since it is entirely unclear from that tutorial what the factor 20 (or
the factor 10) refers to, I would not have understood that code to
mean "even the fastest path of a cpdef function is slower than a
cdef". There is a lot of documentation around that states "a cpdef
function is essentially a cdef function that is also available and
override-able as a python function" without stating that the
overriding can also take effect at cdef level and (naturally) causes
overhead. I think this definitely deserves to be clarified in the
cython documentation.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to