New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Waste of time in iterator_edges 3 #16220
Comments
This comment has been minimized.
This comment has been minimized.
Branch: public/16220 |
Commit: |
Changed keywords from none to datastructure |
comment:2
Isn't there a problem if you want to iterate over the edges but stop midway ? Isn't it the case that the array is never deallocated ? Nathann |
comment:3
Replying to @nathanncohen:
You are right, with a code like
we keep an array never deallocated. But what happens for alloc/dealloc inside cdef functions? A solution would be to implement an iterator in Cython with direct access to the |
comment:4
I would say that it never happens, and that the only way is to create a class with a constructor/destructor. Which is a lot of code.
Well, the question is whether an iterator is cheaper than a malloc. Nathann |
comment:7
#30665 does some improvements to the edge iterator. It is surely not optimized out. Not sure, if we want to close this ticket here. Or keep it for further improvements. |
comment:8
We can certainly close it. |
comment:9
With #30665, I think this can be closed. The branch certainly doesn't work anymore after redesign. |
Reviewer: David Coudert |
comment:10
Agreed. |
Changed branch from public/16220 to none |
Changed author from Vincent Delecroix to none |
Changed commit from |
Further optimizations for graph iterations following #16005.
The sparse graph backend (i.e.
sage.graphs.base.sparse_graph.SparseGraph
andsage.graphs.base.sparse_graph.SparseGraphBackend
) lacks optimization especially for edge iteration. We need to see what is the best we can do and work on it!CC: @nathanncohen
Component: graph theory
Keywords: datastructure
Reviewer: David Coudert
Issue created by migration from https://trac.sagemath.org/ticket/16220
The text was updated successfully, but these errors were encountered: