This impl is mentioned in TFA.. It's much slower and includes branches.
I didn't find any way to get a compiler to generate a branchless version. I tried clang and GCC, both for amd64, with -O0, -O5, -Os, and for clang, -Oz.
Do we know why the compiler doesn't do it? Surely the output is the same and avoiding branches is clearly faster.
Maybe short circuiting requires such an optimization not be made?