Opened 9 years ago

Last modified 9 years ago

#13840 closed enhancement

IntegerListsLex speedup — at Version 4

Reported by: tscrim Owned by: sage-combinat
Priority: major Milestone: sage-5.7
Component: combinatorics Keywords: optimization, integerlistlex
Cc: sage-combinat, nthiery Merged in:
Authors: Travis Scrimshaw Reviewers:
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

Change History (4)

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)
Note: See TracTickets for help on using tickets.