On Tue, Jul 27, 2010 at 11:20 AM, Nicolas M. Thiery
<nicolas.thi...@u-psud.fr> wrote:
> On Tue, Jul 27, 2010 at 02:05:21AM -0700, Robert Bradshaw wrote:
>> > Option 4 is to fix this defect in Cython. I played around with this
>> > the other night and the problem is this: the Python C API has only one
>> > slot for both __getattr__ and __getattribute__. If you only overload
>> > the former, CPython can't tell, and assumes you overrode the latter.
>> > It then creates a pure Python stub in your Python classes which call
>> > the __getattribute__ wrapper via Python semantics. I'm thinking if we
>> > can surpress or delete that wrapper if only __getattr__ is implemented
>> > then it will just inherit the slot. I haven't had a chance to try this
>> > out though.
>>
>> And, catching up on my Cython email, Carl Witty may have essentially
>> done this! http://trac.cython.org/cython_trac/ticket/561
>
> Carl, Robert, thanks so much for investigating this!

Yes, indeed. This is absolutely fantastic work you guys did!

>
> Wow a general speed improvement over all non cdef classes will be good :-)
> I am looking forward timing results and trying it out!

Yes, indeed.  And by the way my Cython benchmark was for a non-cdef'd
but still Cython class.  So everything is consistent.

Thanks again Carl, etc.!

William

>
> Cheers,
>                                Nicolas
> --
> Nicolas M. Thiéry "Isil" <nthi...@users.sf.net>
> http://Nicolas.Thiery.name/
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-combinat-devel" group.
> To post to this group, send email to sage-combinat-de...@googlegroups.com.
> To unsubscribe from this group, send email to 
> sage-combinat-devel+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sage-combinat-devel?hl=en.
>
>



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to