Addition is a mathematical operation that represents combining collections of objects together into a larger collection


This is one of the four elementary, mathematical operations of arithmetic; with the others being addition, subtraction and division.

Slower years

Quality Example

"As of a few years ago multiplying was 3x slower than add"

from question "Time taken in executing % / * + - operations"

"Its the multiplying that historically was slower than the add"

from question "C++ pointer comparison with []operator for arrays?"

Precedence higher divide

Quality Example

"With extra braces because multiplying has a higher precedence than add - assuming these are both percentage discounts"

from question "Help calculating tax and discounts"

"In the above example the instance of exprbinopadd is a child of the instance of exprbinopmul although precedence of multiplying is higher than precedence of add which results from the proper consideration of the parentheses"

from question "Parsing strings of user input using the cparse library from git"


"Then i think it would be the problem of precedence in most case they are left-to-right and i think multiplying would be calculated first because in c multiplying is more prior than add instruction by one level"

from question "Parallelism between instructions in TMS320C3x assembler"

Operator higher precedence

"Can someone explain this behaviour multiplying operator has higher precedence than add operator"

from question "Operator precedence and associativity with unary operator java"

Higher precedence

"Moreover i would like to add the pow in my evaluator with an higher precedence than multiplying and divide"

from question "ANTLR : expression evaluator, division and pow"

"Multiplying and divide have higher precedence than add and subtract"

from question "Infix to postfix program"

"I would like to add the pow in my evaluator with an higher precedence than multiplying and divide"

from question "ANTLR : expression evaluator, division and pow"

"To give multiplying and divide higher precedence than add and subtract you can do something like this example adapted from john levine lex yacc 2 e 1992"

from question "Why in some cases I can't use a token as precedence marker"

Clock cycles operation

Quality Example
Operation more

"The multiplying operation uses more clock cycles than the add on many processors"

from question "Efficiency: arrays vs pointers"


"However multiplying is faster than adding even though less clock cycles are used to add verses multiplying according to what my particular cpu s datasheet says about the instructions being used"

from question "SIMD with Altivec: why is multiplying two vectors faster than adding two vectors?"


Quality Example

"Add sub are cheaper than multiplying better throughput and lower latency"

from question "Possible to mul r1,r1?"


"Where multiplying binds more tightly than add"

from question "Groovy dsl - is infix operator possible?"


"On a cpu with a fast multiplier multiplying may only be on the order of 4 times slower than add but on normal hardware it s 16-32 times slower for a 32 bit operation"

from question "Time taken in executing % / * + - operations"


"Add is faster than mul but if you want to multiplying two general values mul is far faster than any loop iterating add operations"

from question "Add vs mul (IA32-Assembly)"

More time

"Functionally a multiplying will always take more time than an add because it combines a true multiplying along with a true addition step"

from question "Is integer multiplication really same speed as addition on modern CPU"

Lower resolutions

"You can add higher and lower resolutions by multiplying or dividing them by 2"

from question "Set zoomlevels for gwt-openlayers and openstreetmap"

Throughput lower

"For example fp add throughput is lower than fma or multiplying on intel before skylake 1 vector per clock instead of 2"

from question "Why is vectorization, faster in general, than loops?"

More expensive

"Multiplying is still somewhat more expensive than add on modern computers and compilers go to some effort to replace them with one or two shifts+add instructions"

from question "* (no title is found for this review)"

Back to Home
Data comes from Stack Exchange with CC-BY-SA-3.0