I am trying to optimize the division and modular operation to increase the overall performance of the code in C.
I have
UINT32 quo = num / 520 ;
UINT32 rem = num % 520 ;
Most of the blogs mentioned the optimization for the power of 2 operations like
num % (2^i) = num & (2^i -1 ).
num in my code will be a fairly large number.
Please suggest an alternative ways for above piece of code.