shift bit & performance?

Halevy, Benny bhalevy at
Tue Oct 21 17:35:06 EDT 2003

Could be meaningful on a 32 bit platform doing 64-bit math emulation.
Emulating shift is much cheaper than multiply/divide.


>-----Original Message-----
>From: Dean Johnson [mailto:dtj at]
>Sent: Tuesday, October 21, 2003 3:34 PM
>To: Eduardo Cesar Cabrera Flores
>Cc: beowulf at
>Subject: Re: shift bit & performance?
>On Tue, 2003-10-21 at 14:32, Eduardo Cesar Cabrera Flores wrote:
>> Hi, 
>> sometime ago, somebody sent an info about performance 
>working with "<<" & 
>> ">>" doing shift bits instead of using "*" or "/"
>>  Could anybody help me about it?
>There is certainly performance to be had from using a logical 
>shift instead of a 
>multiply or divide, but its of declining value. I am fairly 
>sure that with modern
>compilers you do a integer divide by a constant power of 2, 
>that it will generate
>a logical shift. That aint rocket science.
>	-Dean
>Beowulf mailing list, Beowulf at
>To change your subscription (digest mode or unsubscribe) visit 
Beowulf mailing list, Beowulf at
To change your subscription (digest mode or unsubscribe) visit

More information about the Beowulf mailing list