zygalm1s1u / boolcast Goto Github PK
View Code? Open in Web Editor NEWThis library is intended to be used with the branchless programming technique which generally plays nicer with RISC systems. Sometimes, pipeline hazards (structural, or data) which can potentially manifest as pipeline stalls, can occur through branch instruction sequences that the compiler cannot avoid. These bubbles can be avoided by using arithmetic instructions instead of branching multiple times. Using bits not only saves memory, but also in most cases, speeds up the logic.