Division

In mathematics, division (÷) is an arithmetic elementary operation.

Modulo

The modulo (sometimes called modulus) operation finds the remainder of division of one number by another

Wise operations slow

Quality | Example |
---|---|

Much faster |
"Since bit wise operations can be done very fast and division operations are relatively slow this type of modulo is much faster than doing a division" from question "Low level implementation of bitwise Mod" |

Faster |
"If you compute modulo a power of two using bitwise and is simpler and generally faster than performing division" from question "Assembly Language - How to Do Modulo?" |

Number bits harder

Quality | Example |
---|---|

Much harder |
"Programmers like to use this property to speed up programs because it s easy to chop off some number of bits but performing a modulo is much harder it s about as hard as doing a division" from question "The idea behind unsigned integer" |

Better straight |
"Modulo gives you a remainder which is why it s better than straight division in situations where you re number of elements can change" from question "Using jQuery to delay loading of divs?" |

Others