Comment Comment by bjourne You can find out for yourself using the Compiler Explorer (godbolt): https://godbolt.org/z/qrYGzMjWd Looks to me as if If is more efficient here. parent bjourne 3 years ago