#11900: Serious regression caused by #9138
----------------------------+-----------------------------------------------
   Reporter:  SimonKing     |          Owner:  tbd                  
       Type:  defect        |         Status:  needs_work           
   Priority:  major         |      Milestone:  sage-4.7.3           
  Component:  performance   |       Keywords:  categories regression
Work_issues:  fix doctests  |       Upstream:  N/A                  
   Reviewer:                |         Author:  Simon King           
     Merged:                |   Dependencies:  #9138 #11911         
----------------------------+-----------------------------------------------

Comment(by nthiery):

 Hi Simon,

 Replying to [comment:50 SimonKing]:
 > and also it is faster to do `base_ring.is_ring()` if `is_ring` is a
 parent method.

 I thought that you had optimized the `in` containment to make it as
 fast as a method call? Besides, as far as I remember from previous
 discussions, we had agreed on the following:

  - X in Fields() would return whether X is already known to be a
    field.

  - X.is_field() would return whether X *is* a field, possibly
    launching a costly computation if needed, and possibly updating the
    category afterward

 Finally, to do dispatching in category code, the preferred idiom would
 be X in Fields(). Roughly speaking, operations on an element depend on
 its declared parent, operations on a parent depend on its declared
 category.

 Cheers,
                             Nicolas

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11900#comment:52>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to