#18395: (moderate) Speedup in layout_spring
----------------------------+---------------------------------
   Reporter:  ncohen        |            Owner:
       Type:  enhancement   |           Status:  new
   Priority:  major         |        Milestone:  sage-6.7
  Component:  graph theory  |         Keywords:
  Merged in:                |          Authors:  Nathann Cohen
  Reviewers:                |  Report Upstream:  N/A
Work issues:                |           Branch:
     Commit:                |     Dependencies:
   Stopgaps:                |
----------------------------+---------------------------------
 This branch improves (a bit) the performances of the 'layout_spring'
 algorithm, i.e. the attraction/repulsion layout for graphs.

 I tested it on the `CameronGraph` (big and dense), with the following
 results:

 Before:

 {{{
 sage: g = graphs.CameronGraph()
 sage: %time _=g.layout_spring(iterations=100000)
 CPU times: user 30.8 s, sys: 8 ms, total: 30.8 s
 Wall time: 30.8 s
 }}}

 After

 {{{
 sage: g = graphs.CameronGraph()
 sage: %time _=g.layout_spring(iterations=100000)
 CPU times: user 14.3 s, sys: 4 ms, total: 14.3 s
 Wall time: 14.3 s
 }}}

 Honestly, that is mostly a failure. Most of the speedup comes from
 templating the code so that `dim=2` and `dim=3` are decided at compile-
 time. Most of the time it spend mulsitplying floats, and that's what I
 have been trying to reduce. Not with obvious success `:-/`

 Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/18395>
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