Ticket #4102 (new feature request)
Bit manipulation built-ins
| Reported by: | uzytkownik | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.6.2 |
| Component: | libraries/base | Version: | 6.12.2 |
| Keywords: | Cc: | josefs@…, gabriel@…, dterei, rrnewton@…, wren@…, johan.tibell@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
So far Haskell/GHC lacks more HL bit manipulation instructions which on many platform can be compiled to single instruction. Probably the good guide are those implemented in LLVM:
- byte swap
- population count
- number of leading zeros
- number of trailing zeros
All of them can be implemented in terms of Data.Bits - however not quite in efficient way (like looping over patterns).
Change History
Note: See
TracTickets for help on using
tickets.
