#13730: Speed up some graph iterations
--------------------------------+-------------------------------------------
       Reporter:  dcoudert      |         Owner:  jason, ncohen, rlm
           Type:  enhancement   |        Status:  needs_review      
       Priority:  major         |     Milestone:  sage-5.8          
      Component:  graph theory  |    Resolution:                    
       Keywords:                |   Work issues:                    
Report Upstream:  N/A           |     Reviewers:                    
        Authors:                |     Merged in:                    
   Dependencies:                |      Stopgaps:                    
--------------------------------+-------------------------------------------

Comment (by ncohen):

 Your updated patch would fail if there are two edges between two vertices,
 and the user removes one of the two edges.

 You unnecessarily check whether the dictionaries contain a list associated
 to a vertex of the graph, and it would probably be better to associate an
 empty list to each vertex from the beginning. Anyway you have to make
 TESTS to decide what to do.

 The functions you add are not doctested.

 You do not document the features you add either.

 I think that it would be better to add what you need in the code directly,
 without creating 2

 Please, do not write this patch.

 > Is there anyone here that can shed some light on it or point to the
 relevant documentation - I was not able to find any.

 There isn't, that's one of the problems. I write some comments in the code
 about some parts of it when I have to understand how it works to fix a
 bug.

 > Where should this improvement be implemented?

 I do not know. What I would do if I were to write this patch, or what I
 will do if you force  me to write it, is try to understand why the current
 implementation is so slow compared to dictionaries. I would try to locate
 the place which makes a difference in the timings. This has to come from
 the way edges are stored, and from what I remember this part of the code
 is not that clear.

 Nathann

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13730#comment:13>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to