#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):
Replying to [comment:23 afiori]:
> Even so, obviously it would be best to improve the speed of the new code
to match the old code, but if this isn't possible one could add parameters
to parent constructors of the form
> expect_lots_of_coercion = True, expect_lots_of_actions=True
> and let either the user or the class implementer decide if it is likely
there will be a lot of coercions or actions and pass the appropriate
parameter.
No, sticking with the old implementation (possibly made lazy) would
probably be a far better choice. I should stress this code is an
experiment. Perhaps open addressing isn't an appropriate choice for our
application or perhaps I just made an error in my implementation. I didn't
replicate all the tuning choices made in python's dict but went for a
"straight" implementation first.
> The following is a bit off topic, implicit coercion is clearly important
(and incredibly useful), but wouldn't it always be strictly faster for a
caller to explicitly coerce with the correct function rather than letting
things get to the lookup code?
Yes, but probably hardly noticeably so. The conversions are going to be
the expensive bit. Far better: make sure that your elements are all in the
right parent anyway (for actions this doesn't apply of course).
--
Ticket URL: <http://trac.sagemath.org/ticket/15367#comment:27>
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.