bool vs BOOL, which fast?
I written a function, that function must return a true or false.
(VC++ version)
BOOL IsOK() {
BOOL yes ;
// Do something
return yes ; // I check the BOOL is size of 4 byte (Microsoft define the BOOL is a int)
}
(C++ standard version)
bool IsOK() {
bool yes ;
// Do something
return yes ; // I check the bool is size of 1 byte
}
Check return value method is:
int size = sizeof( IsOK() ) ;
Now question is, which function return the value is most fast ?