#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:  Nils Bruin         |    Reviewers:  Simon King
Report Upstream:  N/A                |  Work issues:  Improve timings
         Branch:                     |       Commit:
  u/SimonKing/ticket/15367           |  a2852e9610a76e6df392544b01b8e3c319b1cdd4
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by nbruin):

 Ouch, that is indeed not such good news and with such a degradation in
 performance I would definitely not recommend merging it. Things I can
 think of:
  - We might have to improve the initial seed of the hash function. If
 we're getting many collisions, For `dict`, `oldMonoDict` and `newMonoDict`
 we're all using different hash functions. In the test above you never
 timed pure data item retrieval (both existing and non-existing entries).
 If we can have that data too, we might be able to see if the problem is
 there
  - We are probably hitting resizing more often (since dict starts with
 quadrupling, it resizes less), so if that's a problem we could be more
 aggressive there.
  - I am allocating memory on delete as well, for well-documented reasons.
 That's more expensive than straight dereffing. Maybe much more expensive?
  - perhaps the GC code around the new dicts is less than optimal? I
 checked the C-code that Cython generated for the `_traverse` and `_clear`
 methods and was pretty happy with them, but perhaps there's overhead there
 as well.

 Finally, note that `MonoDict` and `TripleDict` are optimized for read
 speed, not particularly the other operations. I think that's the frequent
 operation on them in the coercion framework; discovery much less so
 (otherwise parents must be disappearing/reappearing all the time and the
 creation overhead of the parent is likely much higher).

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