#20166: Implement non-recursive iterator for (weighted) integer vectors
-------------------------------------+-------------------------------------
Reporter: tscrim | Owner: sage-combinat
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-7.2
Component: combinatorics | Resolution:
Keywords: | Merged in:
Authors: Travis Scrimshaw | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
public/combinat/integer_vectors_iterator-20166|
6a4acb53d3eb196e2d508b32508d57888884dc28
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Up to twice faster than your version ;-)
- it is always a bad idea to use `list.insert(0, XX)` and `list.pop(0)`.
Lists are implemented as C arrays, and modifications at the bottom is
`O(n)`. Whereas `list.pop()` is always `O(1)`.
- it is always good to avoid coercion `int / ZZ`.
--
Ticket URL: <http://trac.sagemath.org/ticket/20166#comment:6>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.