Author: Gerd Isenberg
Date: 10:20:14 12/04/03
Go up one level in this thread
>OK. If I interpret that correctly, if I occasionally call this with a >zero value, the cmov might be better due to avoiding the mis-predicted >branch. But if it is always non-zero, then the jnz is better. Of course, if there is always the true none zero precondition, why not skipping the jump at all? Or checking the precondition by some debug assert? Or using two implementations? Otherwise, if you loop like this, while (( x = firstOne(..)) < 64 ) ... there is a second (well predicted) branch.
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.