#19033: RIF/CIF: search and subintervals by a bisection-algorithm
-------------------------------------+-------------------------------------
       Reporter:  dkrenn             |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.9
      Component:  numerical          |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Daniel Krenn       |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/dkrenn/rif/bisect                |  788fb330983d2ab71f23b264753d2c810aa6d142
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by dkrenn):

 Hi Vincent,

 Replying to [comment:3 vdelecroix]:
 > I guess that the line
 > {{{
 > verbose('iteration %s with results in %s of %s cells' %
 >    (iteration, len(result), len(open)), level=2)
 > }}}
 > is quite bad for performances. The string formatting is done whatever
 the verbose function is doing. > Did you do some profiling?

 No, I didn't do any with this line included (I did on my old code, which
 used if and print für debugging).

 > Just for curiosity, do you know how good is `fast_callable` with
 interval fields?

 Don't know. I used it with some larger symbolic expressions, and what I
 remember, I had a significant speedup there.

 > It looks pretty bad on the following example
 > {{{
 > sage: f(x) = log(exp(x*sin(x)) + exp(x*cos(x)))
 > sage: F = fast_callable(f, domain=RIF)
 > sage: r = RIF(0.1,0.2)
 > sage: %timeit F(r)
 > 10000 loops, best of 3: 54.6 µs per loop
 > sage: %timeit ((r*r.sin()).exp() + (r*r.cos()).exp()).log()
 > 10000 loops, best of 3: 32.8 µs per loop
 > }}}
 > compared to reals
 > {{{
 > sage: F = fast_callable(f, domain=RR)
 > sage: r = 0.1
 > sage: %timeit F(r)
 > 100000 loops, best of 3: 12.4 µs per loop
 > sage: %timeit ((r*r.sin()).exp() + (r*r.cos()).exp()).log()
 > 10000 loops, best of 3: 16.5 µs per loop
 > }}}

 Not so good...

 Any suggestions on the bisect-code using fast_callable?

 Daniel

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