79572480

Date: 2025-04-14 06:33:09
Score: 1.5
Natty:
Report link

This question only comes up if multiplications and divisions are to be "optimised" by shifts. Since decades, this is done by the compiler, and never performance relevant; just obfuscates the program.

So if a number shall be divided by 8, the proper type should be used and the division written. If a certain number of bits has to be moved right, use an unsigned integer; the high order bits are irrelevant in this case.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Rainer Glaschick