#16926: Merge the features of SymmetricGroupAlgebra and SymmetricGroup.algebra
-------------------------------------+-------------------------------------
       Reporter:  nthiery            |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.4
      Component:  combinatorics      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Travis Scrimshaw   |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  public/combinat/fix_sga-16926      |  947bed483cd03fbd03cc0741235e50fd8b568193
   Dependencies:  #17981             |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by tscrim):

 I've made some tweaks to the permutations multiplication, which
 significantly drops the number of function calls according to `%prun`, as
 well as cythonizing it. Here's my timings:
 {{{
 sage: P = Permutations(5)
 sage: x = P.random_element()
 sage: y = P.random_element()
 sage: %timeit x*y
 10000 loops, best of 3: 61.2 µs per loop
 sage: P = Permutations(100)
 sage: x = P.random_element()
 sage: y = P.random_element()
 sage: %timeit x*y
 1000 loops, best of 3: 167 µs per loop
 }}}
 Before:
 {{{
 sage: %timeit x*y
 10000 loops, best of 3: 87.3 µs per loop
 sage: %timeit x*y
 1000 loops, best of 3: 210 µs per loop
 }}}
 I don't care so much on `retract_okounkov_vershik`, but since you say its
 a very minor regression, I'm not going to consider it (in fact, it might
 be faster now with faster multiplication). Here's some timings of
 `left_action_product`:
 {{{
 sage: P = Permutations(5)
 sage: x = P.random_element()
 sage: Q = Permutations(100)
 sage: y = Q.random_element()
 sage: %timeit x*y
 1000 loops, best of 3: 300 µs per loop
 sage: %timeit x.left_action_product(y)
 10000 loops, best of 3: 167 µs per loop
 }}}
 Before:
 {{{
 sage: %timeit x*y
 1000 loops, best of 3: 225 µs per loop
 sage: %timeit x.left_action_product(y)
 1000 loops, best of 3: 212 µs per loop
 }}}
 So there's ~20% slowdown when multiplying different parents, which
 surprises me somewhat. Let me see if I can fix that for a few minutes...

--
Ticket URL: <http://trac.sagemath.org/ticket/16926#comment:45>
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to