Opened 8 years ago
Closed 23 months ago
#8287 closed enhancement (fixed)
The _check used for creation of words makes it slower
Reported by: | slabbe | Owned by: | slabbe |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | combinatorics | Keywords: | |
Cc: | vdelecroix | Merged in: | |
Authors: | Reviewers: | Vincent Delecroix | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
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
Attachments (1)
Change History (9)
Changed 8 years ago by
comment:1 Changed 8 years ago by
- Status changed from new to needs_work
comment:2 Changed 4 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:3 Changed 4 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:4 Changed 3 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:5 Changed 3 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:6 Changed 23 months ago by
- Cc vdelecroix added
- Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
- Status changed from needs_work to needs_review
comment:7 Changed 23 months ago by
- Reviewers set to Vincent Delecroix
- Status changed from needs_review to positive_review
comment:8 Changed 23 months ago by
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
It was done last year in #17021. I suggest to close this ticket as duplicate.