Re: [PATCH 5/8] bitsperlong.h: introduce SMALL_CONST() macro

2021-02-01 Thread Yury Norov
On Mon, Feb 1, 2021 at 5:45 AM Andy Shevchenko wrote: > > On Sat, Jan 30, 2021 at 11:17:16AM -0800, Yury Norov wrote: > > Many algorithms become simpler if they are passed with relatively small > > input values. One example is bitmap operations when the whole bitmap fits > > into one word. To impl

Re: [PATCH 5/8] bitsperlong.h: introduce SMALL_CONST() macro

2021-02-01 Thread Andy Shevchenko
On Sat, Jan 30, 2021 at 11:17:16AM -0800, Yury Norov wrote: > Many algorithms become simpler if they are passed with relatively small > input values. One example is bitmap operations when the whole bitmap fits > into one word. To implement such simplifications, linux/bitmap.h declares > small_const

[PATCH 5/8] bitsperlong.h: introduce SMALL_CONST() macro

2021-01-30 Thread Yury Norov
Many algorithms become simpler if they are passed with relatively small input values. One example is bitmap operations when the whole bitmap fits into one word. To implement such simplifications, linux/bitmap.h declares small_const_nbits() macro. Other subsystems may also benefit from optimization