Messages in this thread | | | Date | Thu, 17 Aug 2023 12:38:28 +0300 | From | Andy Shevchenko <> | Subject | Re: [PATCH] bitmap: optimize bitmap_remap() |
| |
On Thu, Aug 17, 2023 at 12:37:05PM +0300, Andy Shevchenko wrote: > On Tue, Aug 15, 2023 at 04:59:34PM -0700, Yury Norov wrote:
...
> > int n = bitmap_pos_to_ord(old, oldbit, nbits); > > > > + bit = (n < 0) ? oldbit : /* identity map */ > > Can't you also optimize this case? > > Something like > > bitmap_xor(tmp, old, new) // maybe even better approach, dunno
> bitmap_empty(tmp) // can be replaced by find first bit
Or reuse bitmap_weight()...
> ?
-- With Best Regards, Andy Shevchenko
| |