#11382: subposet is too slow
-----------------------------+----------------------------------------------
   Reporter:  hivert         |          Owner:  sage-combinat 
       Type:  defect         |         Status:  new           
   Priority:  major          |      Milestone:  sage-4.7.1    
  Component:  combinatorics  |       Keywords:  poset subposet
Work_issues:                 |       Upstream:  N/A           
   Reviewer:                 |         Author:  Florent Hivert
     Merged:                 |   Dependencies:                
-----------------------------+----------------------------------------------
 A lot of unnecessary and redundant check are performed. See a more precise
 analyze on
 [http://groups.google.com/group/sage-combinat-
 devel/browse_thread/thread/545480705ce92eaa| this thread] of sage-
 combinat-devel
 {{{
 sage: P = cutting_poset(WeylGroup(['A',4]))
 sage: P.cardinality()
 24
 }}}
 Before:
 {{{
 sage: %timeit P.subposet(P.list()[1:])
 5 loops, best of 3: 214 ms per loop
 }}}
 After:
 {{{
 sage: %timeit P.subposet(P.list()[1:])
 25 loops, best of 3: 24.8 ms per loop
 }}}
 Here is another timing for a bigger poset:
 {{{
 sage: P = cutting_poset(WeylGroup(['A',4]))
 sage: P.cardinality()
 120
 }}}
 Before:
 {{{
 sage: %timeit P.subposet(P.list()[1:])
 5 loops, best of 3: 28.8 s per loop
 }}}
 After:
 {{{
 sage: %timeit P.subposet(P.list()[1:])
 5 loops, best of 3: 597 ms per loop
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11382>
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