[comp.arch] integer multiply

david@sun.uucp (David DiGiacomo) (11/03/88)

In article <19811@apple.Apple.COM> baum@apple.UUCP (Allen Baum) writes:
>>In article <1002@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes:
>(in response to me about integer multiplies)
>  ...
>I'm going further than that. I'm saying they are rare because the are
>unnecessary. They are rare because in the USUAL case they can be strength
>reduced to additions by an optimizing compiler. This is faster than using
>the obvious multiply instruction.
>
>Integer numeric intensive applications are relatively RARE. You
>(Herman Rubin personally) may do them all the time, in which case you
>don't think they are rare, but as a precentage of programs run by all
>computers, they are.

I won't try to defend Herman Rubin, but I'd like to point out an
application area where integer multiply is relatively important:
graphics.  Raster graphics code has to multiply y coordinates by raster
pitch (a variable) for address calculations.  2D drawing algorithms (for
vectors, polygons, etc.) also tend to use multiplies, for clipping if
nothing else.

The next time you design an architecture, try doing a trace of the X
server...