#13991: Mitigate speed regressions in symmetric function related code due to 
#12313
---------------------------------+------------------------------------------
       Reporter:  nbruin         |         Owner:  sage-combinat
           Type:  enhancement    |        Status:  new          
       Priority:  major          |     Milestone:  sage-5.8     
      Component:  combinatorics  |    Resolution:               
       Keywords:                 |   Work issues:               
Report Upstream:  N/A            |     Reviewers:               
        Authors:                 |     Merged in:               
   Dependencies:  #13605         |      Stopgaps:               
---------------------------------+------------------------------------------

Comment (by leif):

 Replying to [comment:33 leif]:
 > Replying to [comment:32 nbruin]:
 > > Note that #13605 has positive review now. Merging that ticket should
 resolve the regression completely.
 >
 > Provided the patch from #13605 applies cleanly (to Sage 5.8.beta2), I'll
 retry with that.

 It does.

 > Verbosely running the tests twice for each installation (with a warm
 filesystem cache) I get even worse timings (first run / second run):
 >
 > Sage 5.7.beta4:  148.6 s / 145.9 s
 >
 > Sage 5.8.beta2:  1738.3 s / 1702.1 s
 >
 > (Wall time.  "Constant" sysload during all tests.)

 Sage 5.8.beta2 + #13605:  257.0 s / 252.6 s

 So much better than with vanilla Sage 5.8.beta2, but still significantly
 slower than with 5.7.beta4.  Memory usage looks "sane(r)" again.

 The patch to `k_dual.py` from #13605 is just
 {{{
 #!patch
 diff --git a/sage/combinat/sf/k_dual.py b/sage/combinat/sf/k_dual.py
 --- a/sage/combinat/sf/k_dual.py
 +++ b/sage/combinat/sf/k_dual.py
 @@ -39,7 +39,7 @@ from sage.misc.cachefunc import cached_m
  from sage.categories.magmas import Magmas
  from sage.misc.constant_function import ConstantFunction
  from sage.categories.graded_hopf_algebras_with_basis import
 GradedHopfAlgebrasWithBasis
 -from sage.combinat.partition import Partition, Partitions,
 Partition_class
 +from sage.combinat.partition import Partition, Partitions, Partition
  from sage.rings.all import Integer
  from sage.combinat.combinat import InfiniteAbstractCombinatorialClass
  import sage.combinat.sf.sfa as sfa
 @@ -370,7 +370,7 @@ class KBoundedQuotient(UniqueRepresentat

              sage: Q = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1)
              sage: Q.an_element()
 -            m3[] + 2*m3[1] + 3*m3[2]
 +            2*m3[] + 2*m3[1] + 3*m3[2]
          """
          return self.a_realization().an_element()

 @@ -595,7 +595,7 @@ class KBoundedQuotientBases(Category_rea
                  sage: F[[]]
                  F3[]
              """
 -            if isinstance(c, Partition_class):
 +            if isinstance(c, Partition):
                  assert len(rest) == 0
              else:
                  if len(rest) > 0 or isinstance(c,(int,Integer)):
 @@ -642,7 +642,7 @@ class KBoundedQuotientBases(Category_rea
              EXAMPLES::

                  sage:
 SymmetricFunctions(QQ['t']).kBoundedQuotient(3,t=1).an_element()
 -                m3[] + 2*m3[1] + 3*m3[2]
 +                2*m3[] + 2*m3[1] + 3*m3[2]
              """

              return self( Partition(srange(self.k,0,-1)))
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13991#comment:34>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to