#13730: Speed up some graph iterations
--------------------------------+----------------------------------
Reporter: dcoudert | Owner: jason, ncohen, rlm
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.11
Component: graph theory | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
--------------------------------+----------------------------------
Comment (by azi):
And also the relevant profilings.. If they are of any help..
{{{
sage: G = graphs.RandomBarabasiAlbert(1000,2)
sage: %prun E = [(u,v) for u in G for v in G.neighbor_iterator(u)]
1003 function calls in 0.005 seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
1000 0.003 0.000 0.003 0.000
generic_graph.py:7848(neighbor_iterator)
1 0.002 0.002 0.005 0.005 <string>:1(<module>)
1 0.000 0.000 0.000 0.000
generic_graph.py:7794(vertex_iterator)
1 0.000 0.000 0.000 0.000 {method 'disable' of
'_lsprof.Profiler' objects}
sage: %prun E = [(u,v) for u in S.verts() for v in S.out_neighbors(u)]
1003 function calls in 0.001 seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.001 0.001 0.001 0.001 <string>:1(<module>)
1000 0.000 0.000 0.000 0.000 {method 'out_neighbors' of
'sage.graphs.base.sparse_graph.SparseGraph' objects}
1 0.000 0.000 0.000 0.000 {method 'verts' of
'sage.graphs.base.c_graph.CGraph' objects}
1 0.000 0.000 0.000 0.000 {method 'disable' of
'_lsprof.Profiler' objects}
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/13730#comment:29>
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/groups/opt_out.