#715: Parents probably not reclaimed due to too much caching
--------------------------------------------------+-------------------------
Reporter: robertwb | Owner: somebody
Type: defect | Status: needs_work
Priority: major | Milestone: sage-5.0
Component: coercion | Resolution:
Keywords: weak cache coercion Cernay2012 | Work issues:
Report Upstream: N/A | Reviewers: Jean-Pierre
Flori
Authors: Simon King | Merged in:
Dependencies: #9138, #11900, #11599, #11521 | Stopgaps:
--------------------------------------------------+-------------------------
Comment (by SimonKing):
Replying to [comment:173 jpflori]:
> Putting back the if h<0: h=-h (without really thinking about it) seems
to solve the problem.
Thank you for tracking that down! I tested that the Cython modulo operator
works like the Python one, but apparently my mistake was that I tested the
Cython modulo only on Sage integers, but not on C types.
I wonder whether there is a better way to get rid of the problem. for
example: The number h is determined by converting the memory address of an
object into `Py_ssize_t` - which is signed. Isn't there an unsigned
`Py_size_t` (size_t, not ssize_t) as well? Perhaps one should try to use
the unsigned type instead? In that way one would avoid the problem of a
negative modulus, but would still avoid the slow-down resulting from the
test "`if h<0`".
I would like to test whether that works (next week, though).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/715#comment:177>
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.