mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] bitops: Optimize fns() for improved performance
@ 2024-04-30  5:49 Kuan-Wei Chiu
  2024-04-30  5:49 ` [PATCH v2 1/2] lib/find_bit_benchmark: Add benchmark test for fns() Kuan-Wei Chiu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Kuan-Wei Chiu @ 2024-04-30  5:49 UTC (permalink / raw)
  To: akpm, yury.norov; +Cc: linux, linux-kernel, Kuan-Wei Chiu

Hello,

This patch series optimizes the fns() function by avoiding repeated
calls to __ffs(). Additionally, tests for fns() have been added in
lib/find_bit_benchmark.c.

Changes in v2:
- Add benchmark test for fns() in lib/find_bit_benchmark.c.
- Change the loop in fns() by counting down from n to 0.
- Add find_bit benchmark result for find_nth_bit in commit message.

Link to v1: https://lkml.kernel.org/20240406235532.613696-1-visitorckw@gmail.com

Kuan-Wei Chiu (2):
  lib/find_bit_benchmark: Add benchmark test for fns()
  bitops: Optimize fns() for improved performance

 include/linux/bitops.h   | 12 +++---------
 lib/find_bit_benchmark.c | 25 +++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 9 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-05-01  4:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-30  5:49 [PATCH v2 0/2] bitops: Optimize fns() for improved performance Kuan-Wei Chiu
2024-04-30  5:49 ` [PATCH v2 1/2] lib/find_bit_benchmark: Add benchmark test for fns() Kuan-Wei Chiu
2024-04-30 17:24   ` Yury Norov
2024-05-01  4:50     ` Kuan-Wei Chiu
2024-04-30 22:50   ` kernel test robot
2024-04-30  5:49 ` [PATCH v2 2/2] bitops: Optimize fns() for improved performance Kuan-Wei Chiu
2024-04-30 17:36   ` Yury Norov
2024-04-30  6:11 ` [PATCH v2 0/2] " Kuan-Wei Chiu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®