Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 596 Bytes

README.md

File metadata and controls

11 lines (7 loc) · 596 Bytes

Writing if and else statements without actually writing them

Problem: check if the given number is even or odd for first 10k integers greater or equalt to zero.

Performance

  • Mean execution time for branched_ifElse is 4.396 seconds
  • Mean execution time for branchless_ifElse is 4.015 seconds

Note

This piece of code does not represent Branchless Programming completely, but writing if-else (or even if - else if - else) statements without actually writing them and using logical operations instead made a slight performance boost so I posted this method in this repository.