#19577: performance improvement of mutable poset used for univariate asymptotic
expansions
-------------------------------------+-------------------------------------
Reporter: dkrenn | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.10
Component: asymptotic | Resolution:
expansions | Merged in:
Keywords: | Reviewers:
Authors: Daniel Krenn | Work issues:
Report Upstream: N/A | Commit:
Branch: u/dkrenn/asy | b2af8aa130f6d386c6a163971f37dc4ba98e4bf6
/speed-topo-iter | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by dkrenn):
Before this patch:
{{{
sage: %timeit -n 1 -r 1 k=4; S = asymptotic_expansions.Stirling('n',
precision=5); n = S.parent().gen(); S.subs(n=k*n) / (S.subs(n=(k-1)*n) *
S)
/local/dakrenn/sage/7.0/local/lib/python2.7/site-
packages/sage/structure/unique_representation.py:1021: FutureWarning: This
class/method/function is marked as experimental. It, its functionality or
its interface might change without a formal deprecation.
See http://trac.sagemath.org/17601 for details.
instance = typecall(cls, *args, **options)
/local/dakrenn/sage/7.0/local/lib/python2.7/site-
packages/sage/rings/asymptotic/growth_group_cartesian.py:305:
FutureWarning: This class/method/function is marked as experimental. It,
its functionality or its interface might change without a formal
deprecation.
See http://trac.sagemath.org/17601 for details.
GenericGrowthGroup.__init__(self, sets[0], Vars, self.category(),
**kwds)
1 loops, best of 1: 1.95 s per loop
sage: %timeit -n 1 -r 1 k=4; S = asymptotic_expansions.Stirling('n',
precision=5); n = S.parent().gen(); S.subs(n=k*n) / (S.subs(n=(k-1)*n) *
S)
1 loops, best of 1: 1.45 s per loop
sage: %timeit -n 1 -r 1 k=4; S = asymptotic_expansions.Stirling('n',
precision=5); n = S.parent().gen(); S.subs(n=k*n) / (S.subs(n=(k-1)*n) *
S)
1 loops, best of 1: 1.48 s per loop
sage: %timeit -n 1 -r 1 k=4; S = asymptotic_expansions.Stirling('n',
precision=5); n = S.parent().gen(); S.subs(n=k*n) / (S.subs(n=(k-1)*n) *
S)
1 loops, best of 1: 1.46 s per loop
}}}
After this patch:
{{{
sage: %timeit -n 1 -r 1 k=4; S = asymptotic_expansions.Stirling('n',
precision=5); n = S.parent().gen(); S.subs(n=k*n) / (S.subs(n=(k-1)*n) *
S)
/local/dakrenn/sage/7.0/local/lib/python2.7/site-
packages/sage/structure/unique_representation.py:1021: FutureWarning: This
class/method/function is marked as experimental. It, its functionality or
its interface might change without a formal deprecation.
See http://trac.sagemath.org/17601 for details.
instance = typecall(cls, *args, **options)
/local/dakrenn/sage/7.0/local/lib/python2.7/site-
packages/sage/rings/asymptotic/growth_group_cartesian.py:305:
FutureWarning: This class/method/function is marked as experimental. It,
its functionality or its interface might change without a formal
deprecation.
See http://trac.sagemath.org/17601 for details.
GenericGrowthGroup.__init__(self, sets[0], Vars, self.category(),
**kwds)
1 loops, best of 1: 1.12 s per loop
sage: %timeit -n 1 -r 1 k=4; S = asymptotic_expansions.Stirling('n',
precision=5); n = S.parent().gen(); S.subs(n=k*n) / (S.subs(n=(k-1)*n) *
S)
1 loops, best of 1: 543 ms per loop
sage: %timeit -n 1 -r 1 k=4; S = asymptotic_expansions.Stirling('n',
precision=5); n = S.parent().gen(); S.subs(n=k*n) / (S.subs(n=(k-1)*n) *
S)
1 loops, best of 1: 546 ms per loop
sage: %timeit -n 1 -r 1 k=4; S = asymptotic_expansions.Stirling('n',
precision=5); n = S.parent().gen(); S.subs(n=k*n) / (S.subs(n=(k-1)*n) *
S)
1 loops, best of 1: 514 ms per loop
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/19577#comment:5>
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.