[lkml]   [2022]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 41/54] arch/x86: replace cpumask_weight with cpumask_weight_eq where appropriate
On Sun, Jan 23, 2022 at 10:39:12AM -0800, Yury Norov wrote:
> smpboot code in somw places calls cpumask_weight() to compare the weight
> of cpumask with a given number. We can do it more efficiently with
> cpumask_weight_eq() because conditional cpumask_weight may stop traversing
> the cpumask earlier, as soon as condition is met.

Why use a more complicated API for code that has no performance

From where I'm sitting this is a net negative for making the code harder
to read.

 \ /
  Last update: 2022-01-24 09:07    [W:0.323 / U:0.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site