Author: Bruce Moreland
Date: 09:14:15 02/05/98
Go up one level in this thread
On February 05, 1998 at 10:41:20, Robert Hyatt wrote:
>On February 05, 1998 at 09:10:20, Amir Ban wrote:
>
>>On February 04, 1998 at 23:03:26, Bruce Moreland wrote:
>>
>>>Actually, it's a good idea to compile your program once and produce an
>>>assembly listing ("-Fc" works great in MSVC), and search for "mul" and
>>>"div", in an effort to minimize these.
>>I thought modern processors do these rather fast.
It still takes a few clocks, especially div. I can't remember if it
also stalls the second pipe, but that would be bad, too.
>you can't do better than AND/OR/XOR/SHIFT... on the machines I use,
>those are
>one-cycle jobbies...
The shift instructions are actually pretty bad on the Pentium, they
stall the second pipe, and maybe they even take more than one clock, I
don't remember.
"shl ax, 1" and "add ax, ax" are not equivalent, in terms of
performance. The add instruction is always better.
bruce
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.