#17196: Relax assumptions on bitset operations
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.4
      Component:  misc               |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Jeroen Demeyer,    |    Reviewers:
  Simon King                         |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  23762a31e383d765cbfe6d5bf958d5d592e1513d
  u/jdemeyer/ticket/17196            |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by jdemeyer):

 Replying to [comment:11 SimonKing]:
 > How clever are compilers?
 >
 > The question is related to idioms like `n % GMP_LIMB_BITS`.
 >
 > `GMP_LIMB_BITS` is a power of two, and it is known at compile time.
 Hence, `n % GMP_LIMB_BITS` does not involve a generally very expensive
 `%`-operation, but boils down to a simple `&`.
 >
 > Will compilers automatically use this optimization?
 Yes, they should. It's an obvious easy optimization.

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