This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Optimization Question


In a message dated 99-07-26 17:28:26 EDT, ronis@ronispc.chem.mcgill.ca writes:

<< 	   a=b*(c+d)  I
 
 versus
 	   a=b*c+b*d  II >>

This optimization usually is quite useful, but it belongs in the source code, 
not the compiler, as it violates the rules about obeying the associations 
specified by the programmer.  One could even make up cases where it might 
fail to produce something close to the intended results.  Just last week, I 
was surprised at the difference it makes in the ELEFUNT results.

Tim
tprince@computer.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]