#13840: IntegerListsLex speedup
------------------------------------------------+---------------------------
       Reporter:  tscrim                        |         Owner:  sage-combinat
           Type:  enhancement                   |        Status:  needs_review 
       Priority:  major                         |     Milestone:  sage-5.7     
      Component:  combinatorics                 |    Resolution:               
       Keywords:  optimization, integerlistlex  |   Work issues:               
Report Upstream:  N/A                           |     Reviewers:               
        Authors:  Travis Scrimshaw              |     Merged in:               
   Dependencies:  #14045                        |      Stopgaps:               
------------------------------------------------+---------------------------
Changes (by tscrim):

  * dependencies:  => #14045


Old description:

> This patch speeds up `IntegerListsLex` by removing calls to sage's
> `infinity` and has `max_slope` and `min_slope` set to `None` and has
> `max_part` default to `float(infinity)`.
>
> Before the patch:
> {{{
> sage: time p = Partitions(150, max_slope=-1, length=15).list()
> Time: CPU 14.04 s, Wall: 14.64 s
> }}}
> After:
> {{{
> sage: time p = Partitions(150, max_slope=-1, length=15).list()
> Time: CPU 2.86 s, Wall: 2.98 s
> }}}

New description:

 This patch speeds up `IntegerListsLex` by removing calls to sage's
 `infinity` and instead uses `float('+inf')` and `float('-inf')`.

 Before the patch:
 {{{
 sage: time p = Partitions(150, max_slope=-1, length=15).list()
 Time: CPU 14.04 s, Wall: 14.64 s
 }}}
 After:
 {{{
 sage: time p = Partitions(150, max_slope=-1, length=15).list()
 Time: CPU 3.97 s, Wall: 4.14 s
 }}}

--

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