#4102: Bit manipulation built-ins
---------------------------------+------------------------------------------
    Reporter:  uzytkownik        |        Owner:              
        Type:  feature request   |       Status:  new         
    Priority:  normal            |    Milestone:  6.16.1      
   Component:  libraries/base    |      Version:  6.12.2      
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by uzytkownik):

 Replying to [comment:4 gwicke]:
 > I have created preliminary bindings to GCC's built-in bit operations and
 exposed them in a separate typeclass. The current code is browsable at
 http://hg.wikidev.net:8000/trie/file/tip/BitsX/ (see Data/Bits/Extras.hs
 for the typeclass and instances), but not yet in its own repository or on
 hackage.
 >
 > (...)
 >
 > A faster, more general and robust solution would probably involve the
 introduction of new primops.
 >
 >
 > Feedback on the code and suggestions for better locations in the module
 hierarchy would be appreciated. I plan to publish this on hackage once
 good locations are found.

 I would strongly suggest Data.Bits for the following reasons:

  - All of them can be implemented in terms of the Data.Bits primitives. It
 is simply an extention for specialization.
  - They should be handled in-line by compiler as for many architectures
 they can be optimized to single instruction. LLVM inline shoul handle it
 perfectly.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4102#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to