#11046: Some comments in the code of SparseGraph
----------------------------+-----------------------------------------------
   Reporter:  ncohen        |       Owner:  jason, ncohen, rlm
       Type:  enhancement   |      Status:  new               
   Priority:  trivial       |   Milestone:  sage-4.7          
  Component:  graph theory  |    Keywords:                    
     Author:                |    Upstream:  N/A               
   Reviewer:                |      Merged:                    
Work_issues:                |  
----------------------------+-----------------------------------------------
 I was reading this code to understand a bit better how the SparseGraph
 backend worked (as it is the default one in Sage), and added comments
 while I was at it.
 I also replaced some loops initializing values by a memset, as it is
 usually faster. This produces next-to-zero improvement in Sage, but well..
 `:-)`

 Before :
 {{{
 625 loops, best of 3: 1.26 ms per loop
 sage: %timeit Graph(10000)
 625 loops, best of 3: 1.25 ms per loop
 sage: %timeit Graph(10000)
 625 loops, best of 3: 1.47 ms per loop
 sage: %timeit Graph(10000)
 625 loops, best of 3: 1.25 ms per loop
 sage: %timeit Graph(10000)
 625 loops, best of 3: 1.25 ms per loop
 sage: %timeit Graph(100)
 625 loops, best of 3: 94.7 µs per loop
 sage: %timeit Graph(100)
 625 loops, best of 3: 98.8 µs per loop
 sage: %timeit Graph(100)
 625 loops, best of 3: 95.8 µs per loop
 sage: %timeit Graph(100)
 625 loops, best of 3: 95.2 µs per loop
 sage: %timeit Graph(100)
 625 loops, best of 3: 96.6 µs per loop
 sage: %timeit Graph(100)
 625 loops, best of 3: 95.2 µs per loop
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11046>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to