#13926: Undo #13014
----------------------------------+-----------------------------------------
Reporter: jdemeyer | Owner: burcin
Type: enhancement | Status: needs_review
Priority: blocker | Milestone: sage-5.6
Component: symbolics | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Jeroen Demeyer | Merged in:
Dependencies: | Stopgaps:
----------------------------------+-----------------------------------------
Comment (by ppurka):
Do you have any idea why gcd is even called in this case? There is no
instance of this function in the plot commands
{{{
...eta0/devel/sage/sage/plot» grep -w gcd -r *
...devel/sage/sage/plot [1] »
}}}
By default, it takes this time on my machine:
{{{
sage: sage: time p = polar_plot(lambda t:
(100/(100+(t-pi/2)^8))*(2-sin(7*t)-cos(30*t)/2), -pi/4, 3*pi/2,
color="red",plot_points=1000)
Time: CPU 39.02 s, Wall: 39.04 s
}}}
I tried changing all the fractions to floats. And then there is a
noticeable improvement.
{{{
sage: time p = polar_plot(lambda t:
(100./(100.+(t-pi/2.)^8))*(2.-sin(7.*t)-cos(30.*t)/2.), -pi/4., 3*pi/2.,
color="red", plot_points=1000)
Time: CPU 6.40 s, Wall: 6.40 s
}}}
I think the correct solution is to not eliminate QQ from gcd, but to
determine which command in plot is introducing this slowdown. Obviously,
some computations are being done in rational space, instead of converting
them to floats. I don't think we need that much precision while doing
plots. Moreover, the functions are always converted to `fast_float`
functions before generating the plot points (or at least it is tried to do
the conversion).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13926#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 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.