#18952: heavy performance regression with real/imag(ex)
-------------------------------+------------------------
       Reporter:  rws          |        Owner:
           Type:  defect       |       Status:  new
       Priority:  major        |    Milestone:  sage-6.8
      Component:  performance  |   Resolution:
       Keywords:               |    Merged in:
        Authors:               |    Reviewers:
Report Upstream:  N/A          |  Work issues:
         Branch:               |       Commit:
   Dependencies:               |     Stopgaps:
-------------------------------+------------------------

Comment (by rws):

 Profiling with callgrind reveals remarkable things, even with only 6 f's.
 Although Pynac accounts for less than 1 per cent of the time, a whopping
 150,000 of numerics are created;  88,000 calls to `ex::is_zero`; 50,000 to
 `Integer(long)`. The 3,400 calls of `atan2` show that the formula
 `power(abs(basis),c)*exp(-d*atan2(b,a))*cos(c*atan2(b,a)+d*log(abs(basis)))`
 is used to compute `real((1/3)^(1/2))` over and over.

 The simplest solution would be to expand before taking the real part in
 Pynac.

 However, there is probably more in this use case regarding performance
 improvement.

--
Ticket URL: <http://trac.sagemath.org/ticket/18952#comment:1>
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.

Reply via email to