#18109: Restructure IntegerListLex code
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.6
Component: combinatorics | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/ticket/18109 | 2be6ad090d51f5eb033cde42a1831ab7d89092ae
Dependencies: #18181, #18184 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by jdemeyer):
There is a small but significant speed-up (again: this is without really
trying to speed up the code).
------
Before:
{{{
sage: timeit('list(IntegerListsLex(14, min_part=1))')
5 loops, best of 3: 1.18 s per loop
}}}
After:
{{{
sage: timeit('list(IntegerListsLex(14, min_part=1))')
5 loops, best of 3: 986 ms per loop
}}}
------
Before:
{{{
sage: timeit('list(IntegerListsLex(28, length=8, floor=lambda i:i,
check=False))')
5 loops, best of 3: 1.11 s per loop
}}}
After:
{{{
sage: timeit('list(IntegerListsLex(28, length=8, floor=lambda i:i,
check=False))')
5 loops, best of 3: 852 ms per loop
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/18109#comment:35>
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.