lkml.org 
[lkml]   [2001]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] OOM aware applications
On Tue, 25 Sep 2001, BALBIR SINGH wrote:

> In the code, I see
>
> points *= 2 and points /= 4 in a few places, recommend changing them to
>
> points <<= 1 and points >>= 2 to help the compiler generate better code

Does your compiler really write different code for *= 2 and <<= 1? If
so, try -O :-)

My gcc writes addl %eax,%eax for either case.

--
Matthias Andree

"Those who give up essential liberties for temporary safety deserve
neither liberty nor safety." - Benjamin Franklin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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