#15367: Empty lists while creating parents
---------------------------+-------------------------
       Reporter:  roed     |        Owner:
           Type:  defect   |       Status:  new
       Priority:  major    |    Milestone:  sage-5.13
      Component:  memleak  |   Resolution:
       Keywords:           |    Merged in:
        Authors:           |    Reviewers:
Report Upstream:  N/A      |  Work issues:
         Branch:           |       Commit:
   Dependencies:           |     Stopgaps:
---------------------------+-------------------------

Comment (by SimonKing):

 Next findings:

 - `MonoDict` does not get resized often, and during doctests of
 sage.schemes, the resize happens at a maximal size of 1118 items
 - `TripleDict` is resized more often. A size of 1277 is not uncommon, and
 maximally I see a resize happening with 5125 items.

 Anyway, I am not sure if these figures are hinting something.

 Do I understand correctly: Your suggestion is to start with a list (an
 actual initialised list) of buckets, but initially each bucket will be
 `None` rather than `[]`. Hence, if the hash makes us choose a bucket that
 is None, then we immediately know that an item with this key hash does not
 exist yet, and we may either create a new bucket (if we want to add a new
 item) or immediately raise a `KeyError` (if we want to get an item).

--
Ticket URL: <http://trac.sagemath.org/ticket/15367#comment:10>
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/groups/opt_out.

Reply via email to