Is there any difference between the speed of the ? operator and the if statement? ex:
vs.Code:int myint;
cin >> myint;
(myint == 5) ? cout << 'a' : cout << 'b';
so is there any speed difference? is the ? operator any faster?Code:int myint;
cin >> myint;
if(myint == 5) cout << 'a';
else cout << 'b';