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

Comment (by SimonKing):

 Replying to [comment:257 jdemeyer]:
 > Replying to [comment:256 SimonKing]:
 > > Are you sure that, e.g., iteration will not be a lot slower when doing
 almost the same shift operation repeatedly for all items contained in a
 single limb?
 >
 > I don't quite understand what you refer to. Which function do you think
 would become slower?

 `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-`>>`.

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