On Tue, Apr 9, 2013 at 1:44 PM, Nils Bruin <nbr...@sfu.ca> wrote:

> 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.
>

Fair enough, documentation can always be better.  I find it reasonable
behavior, for the very real possibility that a user overrides a
cpdef'd function with python, and passes that object into a cdef'd
function.  A user would expect that their new function would be
called, and weird things would happen if not.

-- 
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