Division

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

Multiplication

Multiplication is the mathematical operation of scaling one number by another

Expensive one number

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

More |
"However in general one could expect that a division is a more expensive operation than a multiplication" from question "Conditional tests in primality by trial division" |

Fewer cycles means

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

Usually fewer |
"Floating point multiplication usually takes fewer cycles than floating point division" from question "Is multiplication faster than float division?" |

Many more clock |
"It is common knowledge that division takes many more clock cycles to compute than multiplication" from question "Should I use multiplication or division for recurring floats?" |

Fewer |
"It has to do with the fact that multiplication is itself done by means of binary shifts and additions - far fewer than with division" from question "How to use right shift to avoid operator division" |

Modern cpus fast

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

Heavier |
"Division may be heavier than multiplication but a commenter pointed out that reciprocals are just as fast as multiplication on modern cpus in which case this isn t correct for your case so if you do have 1 x appearing somewhere inside a loop and more than once you can assist by caching the result inside the loop and then using y" from question "Fast 1/X division (reciprocal)" |

Slower float |
"On modern processors float division is a good order of magnitude slower than float multiplication when measured by reciprocal throughput" from question "Fast approximate float division" |

Constant compiler expensive

Expensive cost someone

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

More expensive |
"Division is always much more expensive than multiplication" from question "Efficient Multiply/Divide of two 128-bit Integers on x86 (no 64-bit)" "Division is a lot more expensive than multiplication" from question "Implementing matrix vector multiplication in assembly" "The reason for doing so is to reduce hardware cost as division is more expensive than multiplication" from question "Generating lookup table for arctan computation" |

Much more costly |
"Knowing that a division is much more costly than a multiplication" from question "Speeding up the code using numpy" |

Always more expensive |
"Recently someone suggested to me that division is always more expensive than multiplication" from question "Benefits of multiplication rather than division" |

Much more |
"Division is much more expensive than multiplication" from question "Decrease in instructions retired after loop Unrolling" |

Less expensive |
"Multiplication is less expensive than division so" from question "How to normalize a NumPy array to within a certain range?" |

Integer gap relative

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

Slower |
"The reason to do this is because even though there is an integer division instruction div idiv in the instruction set it s typically very slow several times slower than multiplication" from question "How does the GCC implementation of modulo (%) work, and why does it not use the div instruction?" "Hardware integer division is always slower than multiplication and the gap in the relative latencies of these instructions continues to widen" from question "Fast Division and Modular operation for non two power numbers" |

Worse addition latency

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

Worse |
"Formally it means division cannot have a complexity worse than multiplication" from question "Complexity of division" |

Worse latency |
"Division has worse latency than multiplication or addition by a factor of 2 to 4 on modern x86 cpus and worse throughput by a factor of 6 to 40" from question "Floating point division vs floating point multiplication" |

Harder |
"If you think back to grade school you ll recall that multiplication was harder than addition and division was harder than multiplication" from question "Why is multiplying cheaper than dividing?" |

Slower operations support

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

Slower |
"On many machines particularly those without hardware support for division division is a slower operation than multiplication so this approach can yield a considerable speedup" from question "Calculating Reciprocals: n**(-1) or (1/n)?" |

Slower hardware |
"You always need to know the magic number here 0xaaaaaaab and the correct operations after the multiplication shifts and or additions in most cases and both is different depending on the number you want to divide by and both take too much cpu time to calculate them on the fly that would be slower than hardware division" from question "What's the fastest way to divide an integer by 3?" |

Typically slower |
"Removing division operations by passing through the inverse into the shader is another useful tip as division is typically slower than multiplication" from question "Optimization of HLSL shaders" |

Faster slower integer

Line time multiple

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

Cheaper |
"Following advise i received multiplication is cheaper than division i revised one code line and interestingly enough 71.2 dropped to 1.7 but the if statement just below shot up to 64.8 Ã¢ i just don t get it" from question "Performance optimizing critical code in iOS app" |

More time |
"I have heard division takes more time then multiplication but beyond that i could not determine whether writing this in one line or multiple assignment lines was more efficient" from question "Java Optimizing arithmetic and Assignment Operators for large input" |

Higher precedence i.e

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

Higher presedence |
"I read that multiplication has has higher presedence than division" from question "Multiplication and division: weird output in c" |

Higher precedence |
"Since multiplication is of higher precedence than division" from question "Decimal and mathematical operations" "Does multiplication has higher precedence over division or it is other way round" from question "Multiplication vs Division in C" "Multiplication has higher precedence than division" from question "Macro usage in C?" "In some of the academic literature implied multiplication is interpreted as having higher precedence than division" from question "Which has higher precedence in C -multiplication or division?" |

Others