Elimination of common sub expression during code optimization
An optimizing transformation is a rule for rewriting a section of a program to enhance its execution efficiency without influencing its meaning. One of the methods is "Common sub expression elimination"
In the expression "(a+b)-(a+b)/4", "common subexpression" considers to the duplicated "(a+b)". Compilers implementing this method realize that "(a+b)" won't change, and like, only calculate its value once.