This is something I was thinking, when I searched at Google I couldn't find the answer (maybe I don't know the keywords). Just at a curiosity level, no implementation in any project.
Which is faster:
if (bool)
return true;
else
return false;
or
bool ? true : false;
Are they equal?
Why?
One is faster than another in every language, in every system?
(If someone knows the answer for microcontrollers, Obj-C for iOS or Java, I would really appreciate your answer to my question)
EDIT:
I didn't know that bool ? true : false
is called ternary, as I said "I don't know the keywords".