Will it be more efficient to use shift operation instead of multiplication and division in C language?
This article introduces the knowledge of "will it be more efficient to use shift operation instead of multiplication and division operation in C language?" in the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!
In C language program development, some shift operations seem to achieve the same effect as multiplication and division operations. For example, 4 > > 1 equals 2, and moving one bit to the right is equivalent to dividing by 2. Similarly, 2