It seems that c++ compilers do optimise those things quite efficiently.
I agree with you that we use the original code.