#18395: (moderate) Speedup in layout_spring
-------------------------+-------------------------------------------------
Reporter: | Owner:
ncohen | Status: needs_review
Type: | Milestone: sage-6.8
enhancement | Resolution:
Priority: major | Merged in:
Component: graph | Reviewers:
theory | Work issues:
Keywords: | Commit:
Authors: | 0a5461da982420160000c48c417dcb374863a16a
Nathann Cohen | Stopgaps:
Report Upstream: N/A |
Branch: |
public/18395 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by vbraun):
Those two almost certainly compile to the same binary:
{{{
- for x from 0 <= x < dim:
- disp_i[x] += delta[x] * force
- disp_j[x] -= delta[x] * force
+ for x in range(dim):
+ d_tmp = delta[x] * force
+ disp_i[x] += d_tmp
+ disp_j[x] -= d_tmp
}}}
You can probably speed it by a few orders of magnitude by not using
Euler's method.
--
Ticket URL: <http://trac.sagemath.org/ticket/18395#comment:15>
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.