Bit manipulation built-ins
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).
Trac metadata
Trac field | Value |
---|---|
Version | 6.12.2 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries/base |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |