#15820: Implement sequences of bounded integers
-------------------------------------+-------------------------------------
Reporter: SimonKing | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.3
Component: algebra | Resolution:
Keywords: sequence bounded | Merged in:
integer | Reviewers:
Authors: Simon King | Work issues:
Report Upstream: N/A | Commit:
Branch: | 5dc78c5f5f647bf95b98da916d7086fae539ffb8
u/SimonKing/ticket/15820 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by SimonKing):
Replying to [comment:56 mmezzarobba]:
> The documentation for `mpn_*` is at https://gmplib.org/manual
/Low_002dlevel-Functions.html
Thank you, I'll have a look and will try to compare.
> > > It looks like you are already doing most if not all memory
management by hand...
> >
> > What would be the alternative to doing so?
>
> I'm not saying I see one, only that, as far as I understand, automatic
memory management is the main advantage of `mpz_t` over `mpn_*` when you
are dealing with nonnegative integers (hence my first question).
Now I understand what you mean by your statement that I did all memory
management by hand: I am not using `mpz_init` but `mpz_init2`, telling
exactly how many bits I will need. I found that it has a noticeable impact
on performance, since otherwise re-allocations will happen internally.
--
Ticket URL: <http://trac.sagemath.org/ticket/15820#comment:57>
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/d/optout.