Re: [sage-devel] Re: cpdef (a little) harmful

2013-04-09 Thread Robert Bradshaw
On Tue, Apr 9, 2013 at 5:26 PM, Nils Bruin wrote: > On Apr 9, 4:11 pm, Robert Bradshaw > wrote: >> To let x.foo() call different functions depending on whether your in >> Cython or Python, or even worse whether x is fully typed, would be >> even more surprising. > > Does cython overload on type s

Re: [sage-devel] Re: cpdef (a little) harmful

2013-04-09 Thread Robert Bradshaw
On Tue, Apr 9, 2013 at 1:44 PM, Nils Bruin wrote: > On Apr 9, 1:18 pm, Tom Boothby 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 show

Re: [sage-devel] Re: cpdef (a little) harmful

2013-04-09 Thread Tom Boothby
On Tue, Apr 9, 2013 at 1:44 PM, Nils Bruin 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 documentati