#16220: Waste of time in iterator_edges 3
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner: vdelecroix
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.2
Component: graph theory | Resolution:
Keywords: graphs, | Merged in:
datastructure | Reviewers:
Authors: Vincent Delecroix | Work issues:
Report Upstream: N/A | Commit:
Branch: public/16220 | 98286f45fc077f9778708ca3f064a2f5a13853ad
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by ncohen):
> we keep an array never deallocated. But what happens for alloc/dealloc
inside cdef functions?
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.
> A solution would be to implement an iterator in Cython with direct
access to the `SparseGraph` (doing all proper deallocation in
`__dealloc__`). Is it worth it?
Well, the question is whether an iterator is cheaper than a malloc.
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/16220#comment:4>
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/d/optout.