In a message dated 2/16/2000 1:49:02 AM Pacific Standard Time,
[log in to unmask] writes:
> if A*B+A*C is better than A*(B+C) for a real reason the user had better
> write it that way. Leaving it up to the whim of the compiler as to which
> form is to be used is not an advantage of this proposal.
There will be situations where it's clearly faster, but I've fought a
campaign against making such optimizations an undocumented default for some
time. Compilers which do this sort of thing don't have any way to check the
effect on numerical results. Witness the MipsPro compilers requiring the
option -OPT:fold_reassociate=OFF in order to have parentheses treated in
accordance with standards.
Tim
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|