lkml.org 
[lkml]   [2015]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] lib/int_sqrt.c: Optimize square root function
    From
    Date
    On Mon, 2015-02-02 at 20:41 -0800, Davidlohr Bueso wrote:
    > On Mon, 2015-02-02 at 11:13 -0800, Linus Torvalds wrote:
    > > IOW, instead of
    > >
    > > m = 1UL << (BITS_PER_LONG - 2);
    > >
    > > perhaps something like
    > >
    > > m = 1UL << (BITS_PER_LONG/2- 2);
    > > if (m < x)
    > > m <<= BITS_PER_LONG/2;

    Assuming small values mostly, we could also try more aggressive
    estimators for BITS_PER_LONG == 64. But then again, it probably doesn't
    matter.



    \
     
     \ /
      Last update: 2015-02-03 06:01    [W:4.095 / U:0.052 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site