lkml.org 
[lkml]   [2021]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2021-11-23 10:12    [W:0.088 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site