Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The _check used for creation of words makes it slower #8287

Closed
seblabbe opened this issue Feb 16, 2010 · 3 comments
Closed

The _check used for creation of words makes it slower #8287

seblabbe opened this issue Feb 16, 2010 · 3 comments

Comments

@seblabbe
Copy link
Contributor

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

CC: @videlec

Component: combinatorics

Reviewer: Vincent Delecroix

Issue created by migration from https://trac.sagemath.org/ticket/8287

@seblabbe seblabbe added this to the sage-5.11 milestone Feb 16, 2010
@seblabbe seblabbe self-assigned this Feb 16, 2010
@seblabbe
Copy link
Contributor Author

comment:1

Attachment: trac_8287_check-sl.patch.gz

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@seblabbe
Copy link
Contributor Author

seblabbe commented Dec 2, 2015

comment:6

It was done last year in #17021. I suggest to close this ticket as duplicate.

@seblabbe seblabbe removed this from the sage-6.4 milestone Dec 2, 2015
@videlec
Copy link
Contributor

videlec commented Dec 2, 2015

Reviewer: Vincent Delecroix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants