[GHC] #7860: Add more bit fiddling functions to 'integer-gmp'

GHC ghc-devs at haskell.org
Sun Jun 9 12:10:46 CEST 2013


#7860: Add more bit fiddling functions to 'integer-gmp'
--------------------------------+-------------------------------------------
  Reporter:  lebedev            |          Owner:                  
      Type:  feature request    |         Status:  new             
  Priority:  normal             |      Milestone:                  
 Component:  libraries (other)  |        Version:  7.6.3           
Resolution:                     |       Keywords:  gmp             
        Os:  Unknown/Multiple   |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown       |     Difficulty:  Unknown         
  Testcase:                     |      Blockedby:                  
  Blocking:                     |        Related:  #3489           
--------------------------------+-------------------------------------------
Changes (by igloo):

  * status:  patch => new


Comment:

 Thanks for the patch. However, it's not clear to me that this won't
 actually cause performance regressions. For example, this:
 {{{
 clearBitInteger j@(S# _) i = clearBitInteger (toBig j) i
 }}}
 means that `clearBit` will always unnecessarily promote small integers to
 large integers.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7860#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list