Rado,

First of all, thank you for your improvement!

> I was playing with some big(10^6) graphs and noticed SAGE cannot
> handle constructing them in good time.

I am wondering, what in particular you are using Sage graphs for?
Graphs in Sage are currently in a transition period. Some things are
incredibly fast (using no Python at all), and others are still very
slow. In particular, you might be able to use the faster "c_graph"
implementation of Sage graphs:

sage: D={}
sage: for i in xrange(1,10^3):
    D[i]=[i+1,i-1]
....:
sage: g=Graph(D)
sage: def test(g):
    for i in xrange(g.order()):
        for j in xrange(g.order()):
            _ = g.has_edge(i,j)
....:
sage: time test(g)
CPU times: user 3.23 s, sys: 0.01 s, total: 3.24 s
Wall time: 3.25 s
sage: g=Graph(D,implementation='c_graph')
sage: time test(g)
CPU times: user 1.57 s, sys: 0.00 s, total: 1.57 s
Wall time: 1.58 s

Note that the test would run vastly faster if the test function were
written in Cython.


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to