#12513: Slow CDF fast_callable powers
-----------------------------+----------------------------------------------
Reporter: robertwb | Owner: jason, jkantor
Type: PLEASE CHANGE | Status: new
Priority: major | Milestone: sage-5.0
Component: numerical | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author: Robert Bradshaw
Merged: | Dependencies:
-----------------------------+----------------------------------------------
Before
{{{
sage: var('x,y')
(x, y)
sage: f = (sum(x^k for k in [-10..10]) * sum(y^k for k in
[-10..10])).expand()
sage: ff = fast_callable(f, CDF, (x,y))
sage: %timeit ff(1+2j, 3+4j)
125 loops, best of 3: 4.53 ms per loop
sage: len(ff.python_calls())
756
sage: ff.python_calls()[:10]
[(^10), (^10), (^10), (^9), (^9), (^10), (^10), (^8), (^9), (^9)]
}}}
which is still better than
{{{
sage: %timeit f(x=1+2j, y=3+4j)
25 loops, best of 3: 12 ms per loop
}}}
but nowhere close to
{{{
sage: var('x,y')
(x, y)
sage: f = (sum(x^k for k in [-10..10]) * sum(y^k for k in
[-10..10])).expand()
sage: ff = fast_callable(f, CDF, (x,y))
sage: %timeit ff(1+2j, 3+4j)
625 loops, best of 3: 127 µs per loop
sage: len(ff.python_calls())
0
sage: 4.53 / .127
35.6692913385827
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12513>
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.