#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 vdelecroix):
Replying to [comment:4 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).
If you really want these verbose you should use lazy formatting. I do not
remember what is the state of the art, but you can have a look at
`sage.misc.lazy_string` and `sage.misc.lazy_format`. But you are really
creating a string within the critical loop. I do find it not very
reasonable (the other is fine though).
> > 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.
I am pretty sure that `fast_callable` is better than symbolic and you seem
to confirm that. However, you can see in my small snippet above that
`fast_callable` looks worse than using Python. I should try on a larger
expression but then you have to translate into an object call oriented
expression and I am lazy...
> Any suggestions on the bisect-code using fast_callable?
Check what `fast_callable` is doing with `domain=RIF` and `domain=CIF`
(quickly looking at `ext/fast_callable.pyx` I would say nothing). It can
be done independently of this ticket.
Other comments:
- What is your variable `result` for?
- did you try to more typing. In other words `open = [] -> cdef list open
= []` and `iteration = 0 -> cdef size_t iteration = 0`, etc. Cython does
good job with Python list when it knows that these are lists.
--
Ticket URL: <http://trac.sagemath.org/ticket/19033#comment:5>
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.