#13387: Improve MonoDict and TripleDict data structures
----------------------------------+-----------------------------------------
Reporter: nbruin | Owner: Nils Bruin
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.8
Component: memleak | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Nils Bruin | Merged in:
Dependencies: #11521, #12313 | Stopgaps:
----------------------------------+-----------------------------------------
Comment (by jdemeyer):
Some remarks about the comment (lines 48--62 of
`sage/structure/coerce_dict.pyx`):
Nobody guarantees that `size_t` is a "pointer sized integer". In practice,
the number of bits in a `size_t` does equal the bitness of the machine on
modern systems, but there is no guarantee for this. In C99, there is a
type `uintptr_t`, which is defined as being a pointer-sized unsigned
integer. See also [http://stackoverflow.com/questions/1464174/size-t-vs-
intptr-t] for some good points.
The next sentence (This has an advantage...) could be made more concrete:
Assuming that Py_ssize_t is the same as a C long (which is true on most
Unix-like systems),
this also has the advantage that these Py_ssize_t values are stored as a
Python "int" (as opposed to "long"), which allow for fast conversion
to/from C types.
Typo:
{{{
(<size_t) h)% modulus
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13387#comment:37>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.