#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):

 Replying to [comment:53 SimonKing]:
 > > I thought that you had optimized the `in` containment to make it as
 > > fast as a method call?
 >
 > That's #10667 and needs much more work than this. My aim ''here'' is to
 try and find a sufficiently good solution, so that #9138 can be rescued.
 >
 > It could very well be that some of the changes (e.g. the use of
 `is_ring`) will be reverted by #10667, and replaced with a better
 solution. But I simply wouldn't like to wait another couple of months for
 #10667 to be finished - it would be a shame to postpone #9138 (which
 happens to be a dependency for #10667) such a long time.

 Ok, yes, I am perfectly fine with using is_ring as a temporary measure
 in critical and documented spots.

 In general, +1 on getting #11900 in quickly even if it is not perfect,
 and thanks for all your work on that!

 For the long run, I still would strongly argue for aiming at the "X in
 Fields()" idiom, if it can be made fast enough. It is more conceptual
 and versatile. But let's not waste time on that now, and postpone the
 discussion to your visit in Orsay.

 > >  - 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
 >
 > You are mistaken. Please look at the `__contains__` method of
 `Fields()`. It dispatches to `sage.rings.fields.is_Field`, which
 dispatches to `P.is_field()`.

 I know: I wrote this backward compatibility hack :-)

 What I described was the would-be clean plan for the future.

 Cheers,
                         Nicolas

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11900#comment:54>
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