#18922: Speedup creation of spin crystals
-------------------------------------+-------------------------------------
       Reporter:  tscrim             |        Owner:  sage-combinat
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.8
      Component:  combinatorics      |   Resolution:
       Keywords:  spin crystals      |    Merged in:
        Authors:  Travis Scrimshaw   |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  public/crystals/speedup_spin_construction-18922|  
7bbaef2084bf398af3e95ee79472484d1f7042b0
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by tscrim):

 The `.list()` test is already in the function which creates the B,,n,,
 spin crystal object, so I just added back the element construction example
 to the `_element_constructor_` and added a test to check for consistency.
 Here are my timings.

 With branch:
 {{{
 sage: %time C = crystals.SpinsPlus(['D',6])
 CPU times: user 472 µs, sys: 58 µs, total: 530 µs
 Wall time: 542 µs
 sage: %time C = crystals.SpinsPlus(['D',7])
 CPU times: user 453 µs, sys: 56 µs, total: 509 µs
 Wall time: 523 µs
 sage: %time C = crystals.SpinsMinus(['D',8])
 CPU times: user 0 ns, sys: 0 ns, total: 0 ns
 Wall time: 956 µs
 sage: %time C = crystals.Spins(['B',10])
 CPU times: user 488 µs, sys: 56 µs, total: 544 µs
 Wall time: 490 µs
 }}}
 Before:
 {{{
 sage: %time C = crystals.SpinsPlus(['D',6])
 CPU times: user 465 ms, sys: 69.7 ms, total: 535 ms
 Wall time: 549 ms
 sage: %time C = crystals.SpinsPlus(['D',7])
 CPU times: user 52 ms, sys: 12.7 ms, total: 64.7 ms
 Wall time: 58.6 ms
 sage: %time C = crystals.SpinsMinus(['D',8])
 CPU times: user 223 ms, sys: 20.6 ms, total: 244 ms
 Wall time: 228 ms
 sage: %time C = crystals.Spins(['B',10])
 I got tired after waiting for 10 minutes and killed it and then ran this:
 sage: %time C = crystals.Spins(['B',8])
 CPU times: user 2.59 s, sys: 24 ms, total: 2.61 s
 Wall time: 2.58 s
 }}}

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