In theory, compilers will do this kind of optimization for you. In practice, they cannot. This specific example is a bit subtle because the two are not equivalent unless you make some assumptions about value and whether signed arithmetic 2 is add-on on your target platform.
Use what you find more readable. If and when you have evidence that the performance of this particular test is critical, use what gives you the best performance. Personally, I will probably write:
if ((unsigned int)value >= 96U)
because it is more intuitive for me, and most likely I worked with most compilers.
source share