4 ms·
Still branches
by brokensegue 3y ago
Still branches
- chrismorgan 3y ago#include <stdio.h> #include <stdlib.h> int main(int argc, char** argv) { return printf(&"even\0odd"[(atoi(argv[1]) & 1) * 5]) < 0; }
- charcircuit 3y agoNot always. Popular architectures like x86_64 and ARM have instructions for conditional moves. These instructions do not cause the processor to branch.