Popular Posts

Saturday, July 23, 2011

Modulus(%) operation


Modulus operator is costly.
The modulus operator (%) in various languages is costly operation. Ultimately every operator/operation must result in processor instructions. Some processors won’t have modulus instruction at hardware level, in such case the compilers will insert stubs (predefined functions) to perform modulus. It impacts performance.
Refer : http://geeksforgeeks.org/?p=9057

No comments:

Post a Comment