#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:               |       Upstream:  N/A                  
   Reviewer:               |         Author:  Simon King           
     Merged:               |   Dependencies:  #9138 #11911         
---------------------------+------------------------------------------------

Comment(by SimonKing):

 PS: I would argue as follows.

  * Currently, the category of a finite field is `FiniteFields()`, without
 quotient ring stuff. So, let's be conservative and keep it.
  * Currently, `FiniteField_prime_modn` is both initialised as a
 `FiniteField` and as a `QuotientRing`. With my patch, for saving time, it
 is just initialised as a `Parent` with the category of finite fields, and
 then as a quotient ring, which ''overrides'' that category.
  * That sounds like a vaste of time. Therefore, `QuotientRing.__init__`
 should only try to determine a "category with quotient stuff in it" when
 the category has not been initialised before.

 Doing so yields the following  timing (which is even a little better then
 pre-#9138):
 {{{
 sage: def test():
 ....:     for p in prime_range(10000):
 ....:         P = GF(p)
 ....:
 sage: %time test()
 CPU times: user 0.49 s, sys: 0.01 s, total: 0.50 s
 Wall time: 0.51 s
 }}}

 I'll update my patch in a few minutes.

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