#17016: Implement naive algorithm for factor_set method of a finite word
-------------------------+-------------------------------------------------
Reporter: | Owner:
slabbe | Status: needs_info
Type: | Milestone: sage-6.4
enhancement | Resolution:
Priority: major | Merged in:
Component: | Reviewers:
combinatorics | Work issues:
Keywords: | Commit:
Authors: | 7ed2922be57b5e27c8e5508963c182b80e4fe3e5
Report Upstream: N/A | Stopgaps:
Branch: |
u/slabbe/17016 |
Dependencies: |
-------------------------+-------------------------------------------------
Changes (by vdelecroix):
* status: needs_review => needs_info
Comment:
Hello,
I do not understand your timings... on my computer
{{{
sage: w = Word([randint(0,2) for _ in range(10000)], alphabet=[0,1,2])
sage: %time L = [w.number_of_factors(i, algorithm='naive') for i in
range(20)]
CPU times: user 4.8 s, sys: 48 ms, total: 4.85 s
Wall time: 4.8 s
sage: %time O = [w.number_of_factors(i, algorithm='suffix tree') for i in
range(20)]
CPU times: user 396 ms, sys: 28 ms, total: 424 ms
Wall time: 376 ms
}}}
And the main reason is because the `suffix_tree` is a cached method.
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/17016#comment:2>
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.