Opened 9 years ago

Closed 9 years ago

#13840 closed enhancement (fixed)

IntegerListsLex speedup

Reported by: tscrim Owned by: sage-combinat
Priority: major Milestone: sage-5.7
Component: combinatorics Keywords: optimization, integerlistlex
Cc: sage-combinat, nthiery Merged in: sage-5.7.beta3
Authors: Travis Scrimshaw Reviewers: Mike Hansen
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #14045 Stopgaps:

Status badges

Description (last modified by tscrim)

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

Attachments (1)

trac_13840-integer_list_speedup-ts.patch (7.9 KB) - added by tscrim 9 years ago.
Fixed doctest

Download all attachments as: .zip

Change History (9)

comment:1 Changed 9 years ago by tscrim

  • Status changed from new to needs_review

comment:2 Changed 9 years ago by tscrim

Fixed the doctest in integer_vector.py.

comment:3 Changed 9 years ago by tscrim

  • Cc sage-combinat added

comment:4 Changed 9 years ago by tscrim

  • Dependencies set to #14045
  • Description modified (diff)

comment:5 Changed 9 years ago by mhansen

  • Reviewers set to Mike Hansen
  • Status changed from needs_review to positive_review

Looks good to me.

comment:6 Changed 9 years ago by jdemeyer

  • Status changed from positive_review to needs_work

How was this patch file created? It is missing a "User" field, you should create a $HOME/.hgrc file as explained in http://sagemath.org/doc/developer/producing_patches.html and export the patch using hg export tip.

Changed 9 years ago by tscrim

Fixed doctest

comment:7 Changed 9 years ago by tscrim

  • Status changed from needs_work to positive_review

Fixed.

comment:8 Changed 9 years ago by jdemeyer

  • Merged in set to sage-5.7.beta3
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.