Original Post
So, I was looking up instruction times for multiply and divide in the Intel optimization manual (Pentium 4 edition), to see if it would be worthwhile to convert this divide into a multiply and shift. What it listed was rather surprising. According to the manual, an integer divide takes 23/56-70 cycles (throughput and latency, respectively), while a floating point divide (double precision) takes 38/38. Okay, that seemed odd; but what really surprised me was that it lists unsigned integer multiply as 5/14-18, and floating point multiply as 2/7. Floating point multiplication is more than twice as fast as integer (and floating point divide has about half the latency of integer divide)? When did THAT happen? And does that mean it would be a good idea to convert to floating point, multiply by the reciprocal, and then convert back to integer (they don't even list the convert instructions in the manual)? :P [Edited by - Catafriggm on January 10, 2007 10:56:20 PM]