#8287: The _check used for creation of words makes it slower
-----------------------------+----------------------------------------------
Reporter: slabbe | Owner: slabbe
Type: enhancement | Status: new
Priority: major | Milestone: sage-4.3.3
Component: combinatorics | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
The {{{_check}}} function of the Combinatorial class of all words
(checking that the 40 first letters of the word are in the parent) is
called for each word created by the user ....and by any other function. It
would be good to add a check parameter (True or False) whether to do the
checking. For example, for internal function, it could be turned off. Here
is a example of what can be gained from this modification when generating
all words of a given length :
BEFORE:
{{{
sage: W = Words([0,1])
sage: time l = list(W.iterate_by_length(15))
CPU times: user 2.60 s, sys: 0.09 s, total: 2.69 s
Wall time: 2.71 s
}}}
AFTER:
{{{
sage: W = Words([0,1])
sage: time l = list(W.iterate_by_length(15))
CPU times: user 1.99 s, sys: 0.06 s, total: 2.05 s
Wall time: 2.08 s
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8287>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.