#15820: Implement sequences of bounded integers
-------------------------------------+-------------------------------------
       Reporter:  SimonKing          |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.4
      Component:  algebra            |   Resolution:
       Keywords:  sequence bounded   |    Merged in:
  integer                            |    Reviewers:  Simon King
        Authors:  Simon King,        |  Work issues:
  Jeroen Demeyer                     |       Commit:
Report Upstream:  N/A                |  41c40cf2c59734e7e665ba9c2350da2930c9cc8e
         Branch:                     |     Stopgaps:
  u/SimonKing/ticket/15820           |
   Dependencies:  #17195, #17196     |
-------------------------------------+-------------------------------------

Comment (by jdemeyer):

 Replying to [comment:260 SimonKing]:
 > `BoundedIntegerSequence.__iter__` and `biseq_to_list` would probably
 become
 > slower. Currently, one limb is shifted with mpn_rshift, and then all
 items in
 > this limb are extracted by `>>` in this single limb, before
 mpn_rshifting the
 > next limb. If I understand correctly, you are planning to replace this
 by
 > `biseq_getitem`, which means that you mpn_rshift a limb and extract the
 first
 > item of it, then mpn_rshift the same limb again for the second item.
 >
 > I suppose repeated use of mpn_rshift is slower than a single mpn_rshift
 > followed by repeated single-limb-`>>`.
 As you can see, I implemented `biseq_getitem()` much faster than that, so
 I doubt there is still a slowdown for using repeated calls to
 `biseq_getitem()`.

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