lkml.org 
[lkml]   [2001]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: * 4 converted to << 2 for networking code
On Wed, Jan 10, 2001 at 04:11:46PM +0100, Jakob ?stergaard wrote:
> On most processors <<2 is slower than *4. It's outright stupid to
> write <<2 when we mean *4 in order to optimize for one out of a
> gazillion supported architectures - even more so when the compiler
> for the one CPU where <<2 is faster, will actually generate a shift
> instead of a multiply as a part of the standard optimization.

Hug, ok, so all the << 2 already in should be changed in *4.
My point is that it is better to use only << 2 or *4, selecting
the better form.

--
Salvatore Sanfilippo | <antirez@invece.org>
http://www.kyuzz.org/antirez | PGP: finger antirez@tella.alicom.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.093 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site