#6391: libGAP! -- create a Cython library interface to gap
----------------------------------------------------------------------------+
Reporter: was |
Owner: was
Type: enhancement |
Status: needs_review
Priority: major |
Milestone: sage-5.3
Component: group theory |
Resolution:
Keywords: |
Work issues:
Report Upstream: N/A |
Reviewers: Dima Pasechnik, Ivan Andrus, Volker Braun, William Stein
Authors: Dima Pasechnik, Ivan Andrus, Volker Braun, William Stein |
Merged in:
Dependencies: #13211 |
Stopgaps:
----------------------------------------------------------------------------+
Comment (by nbruin):
Great work! I noticed one thing in keeping references in `owned_objects`.
The way I read the code, it's a list that any new object gets appended to
(and index is stored). Upon deletion of the sage wrapper of the object,
the particular location in the `owned_objects` list is unbound. Doesn't
that mean that the owned_object list can grow in an unbounded way even
when only a bounded number of references to gap_objects is held? i.e.,
wouldn't something like
{{{
i = 0
a = GapElement(i)
while True:
i+=1
b = a
a = GapElement(i)
}}}
For ecllib I ended up keeping a doubly linked list, since insertions and
deletions are O(1), at the cost of a largish constant in memory overhead.
Alternatives include inserting in the first unbound spot of the list,
which has the wrong complexity for object creation unless you keep a free
list. You could keep a stack or a deque of free spots. I don't know if a
FIFO or LIFO strategy would lead to better opportunities to shorten the
reference list.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6391#comment:87>
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.