[SDL] single pixel drawing

Jacek Wojdel wojdel at kbs.twi.tudelft.nl
Wed Jul 17 02:51:01 PDT 2002


On Tue, Jul 16, 2002 at 11:18:36AM -0700, Neil Bradley wrote:
> > They are much less expensive than they used to be, but
> > Multiplies are still more expensive than adds, and you
> 
> How so? At least on the Pentium, Multiplies are 1 clock or less, just like
> shifts.

But since Pentium Pro you can issue two instructions per cycle. Those can be
2 adds, 1 add and 1 shift etc. You cannot however issue more than one
multiplication and it blocks both ALUs. Moreover shifts and adds have
latency of 1 cycle, while multiplication has latency of 4 cycles. In total,
if you have shift+add it will execute in between 2 and 4 cycles, while
mul+add will execute in between 5 and 7 cycles. That's twice the
performance.
Cheers,
	Jacek
-- 
+-------------------------------------+
|from: J.C.Wojdel                     |
|      J.C.Wojdel at cs.tudelft.nl       |
+-------------------------------------+




More information about the SDL mailing list