#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 afiori):
Doesn't your code only test the setting and deleting of items? One hopes
that the getting is actually the by far most common action otherwise...
caching using a hash table is the wrong choice.
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.
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? So couldn't a user get more of a speed
boost by being warned that an implicit coercion is happening and being
encouraged to do the correct cast manually (for example in the above code
I posted, I assume K(2)-K(2) would be strictly faster than 2-K(2)). I know
various databases have settings to either warn on implicit coercion or to
even disable it completely, can this be done in SAGE?
--
Ticket URL: <http://trac.sagemath.org/ticket/15367#comment:23>
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.