Messages in this thread | | | From | Geert Uytterhoeven <> | Date | Tue, 23 Nov 2021 10:10:46 +0100 | Subject | Re: [PATCH 1/4] bitops: Add single_bit_set() |
| |
Hi Andy,
On Tue, Nov 23, 2021 at 10:04 AM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > Be sure you get better assembly in these cases. As I have told already, > hweight() is a single assembly instruction, I'm not sure open coded variant
... on a select set of architectures.
Do we need CONFIG_HAVE_FAST_HWEIGHT?
> may be better even for long bitmaps. That said, assembly comparison and > some performance tests would be nice to have.
> As an API per se it might make sense to have such, but you know that we don't > add it without users.
Indeed. And code for unused APIs increase kernel size, too (without LTO).
Gr{oetje,eeting}s,
Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
| |