Messages in this thread | | | Subject | Re: [PATCH] lib/int_sqrt.c: Optimize square root function | From | Davidlohr Bueso <> | Date | Mon, 02 Feb 2015 20:57:17 -0800 |
| |
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.
| |