lkml.org 
[lkml]   [2021]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 5/8] lib: add find_first_and_bit()
On Sat, Jun 12, 2021 at 1:36 PM Yury Norov <yury.norov@gmail.com> wrote:
>
> Currently find_first_and_bit() is an alias to find_next_and_bit(). However,
> it is widely used in cpumask, so it worth to optimize it. This patch adds
> its own implementation for find_first_and_bit().
>
> On x86_64 find_bit_benchmark says:
>
> Before (#define find_first_and_bit(...) find_next_and_bit(..., 0):
> Start testing find_bit() with random-filled bitmap
> [ 140.291468] find_first_and_bit: 46890919 ns, 32671 iterations
> Start testing find_bit() with sparse bitmap
> [ 140.295028] find_first_and_bit: 7103 ns, 1 iterations
>
> After:
> Start testing find_bit() with random-filled bitmap
> [ 162.574907] find_first_and_bit: 25045813 ns, 32846 iterations
> Start testing find_bit() with sparse bitmap
> [ 162.578458] find_first_and_bit: 4900 ns, 1 iterations
>
> (Thanks to Alexey Klimov for thorough testing.)
>
> Signed-off-by: Yury Norov <yury.norov@gmail.com>

Tested-by: Alexey Klimov <aklimov@redhat.com>

[..]

Best regards,
Alexey

\
 
 \ /
  Last update: 2021-06-14 17:46    [W:0.151 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site