shift bit & performance?
mikee at mikee.ath.cx
Tue Oct 21 16:32:07 EDT 2003
On Tue, 21 Oct 2003, Eduardo Cesar Cabrera Flores wrote:
> sometime ago, somebody sent an info about performance working with "<<" &
> ">>" doing shift bits instead of using "*" or "/"
> Could anybody help me about it?
The operations << and >> are closer to assembler operations
for integer values than * and /. If using * or / there are
many assembler instructions to compute the new values. When
using power of 2s for * or / then << and >> are much faster.
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
More information about the Beowulf