#15030: Switch standard 2D plotting from `fast_float` to `fast_callable`
-------------------------------+----------------------------
Reporter: eviatarbach | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.12
Component: graphics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-------------------------------+----------------------------
Comment (by ppurka):
Hmm.. so, you are changing only the plots for symbolic expressions. This
patch makes the symbolic expression plots about five times slower.
{{{
sage: timeit('plot(abs(log(x)), (x, -20, 20))') # with patch
25 loops, best of 3: 18.5 ms per loop
sage: timeit('plot(abs(log(x)), (x, -20, 20))') # without patch
125 loops, best of 3: 3.58 ms per loop
}}}
What do you think of the following change which introduces only a factor
of two slowdown? The main problem seems to be that the fast float stuff
does not handle complex numbers, and so we can explicitly specify the
domain as CDF. I am not sure what is the default domain.
{{{
+ from sage.ext.fast_callable import fast_callable
+ from sage.rings.all import CDF
+ return fast_callable(self, vars=vars, expect_one_var=True,
+ domain=CDF)
}}}
The timeit results are as follows:
{{{
sage: timeit('plot(abs(log(x)), (x, -20, 20))')
125 loops, best of 3: 6 ms per loop
}}}
A few doctests in `expression.pyx` fail, but they can be fixed (by
changing their output).
--
Ticket URL: <http://trac.sagemath.org/ticket/15030#comment:6>
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/groups/opt_out.