#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:54 mmezzarobba]:
 > Sorry it that's a stupid question (I only glanced through the code), but
 why are you using `mpz`'s and not `mpn`'s?

 Simply because I did not succeed in finding what functions are available
 for `mpn_t`. So, if you can give me a pointer (similar to
 [https://gmplib.org/manual/Integer-Functions.html#Integer-Functions the
 documentation for `mpz_t`]), I'd appreciate. Probably non-signed types
 will be a tad faster than signed types.

 > It looks like you are already doing most if not all memory management by
 hand...

 What would be the alternative to doing so? I mean, what I need is some
 tool to quickly operate on large bit arrays by shift operations,
 preferably also with a good and fast hash function, and without the need
 to think about the number of bits fitting into a byte or a long. I tried
 to implement this myself, using `char*` or `long*` (which would also mean
 to take care of allocating and freeing), but `mpz_t` turns out to be
 faster.

 So, if you know another tool, that is perhaps more directly dedicated to
 bit arrays, then please tell!

--
Ticket URL: <http://trac.sagemath.org/ticket/15820#comment:55>
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.

Reply via email to