public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] lib/int_sqrt: Fix, optimize and document
@ 2017-07-24 15:16 Peter Zijlstra
  2017-07-24 15:16 ` [PATCH 1/3] lib/int_sqrt: Optimize small argument Peter Zijlstra
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Peter Zijlstra @ 2017-07-24 15:16 UTC (permalink / raw)
  To: torvalds, akpm
  Cc: dave, aksgarg1989, tglx, mingo, will.deacon, joe, peterz,
	linux-kernel

Hi,

Here are a few patches that should improve things lib/int_sqrt. As stated
elsewhere; I'm looking at using int_sqrt() to calculate the stdev on a normal
distribution and am expecting the input values to be smallish.

In any case, these optimizations should work fine for large numbers too. And
if you have a find-last-set or count-leading-zeros instruction they rock ;-)

I can post the tool used to generate the numbers or do a patch to add it to
tools/testing/ if people care. The cold numbers are fairly sensitive to code
layout (GCC version, random changes etc..), so I expect the branch predictor of
my SKL is only partially confused or there's other things at play. However the
general trend in the numbers seems fairly stable.

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

end of thread, other threads:[~2017-07-25 16:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-24 15:16 [PATCH 0/3] lib/int_sqrt: Fix, optimize and document Peter Zijlstra
2017-07-24 15:16 ` [PATCH 1/3] lib/int_sqrt: Optimize small argument Peter Zijlstra
2017-07-24 15:16 ` [PATCH 2/3] lib/int_sqrt: Optimize initial value compute Peter Zijlstra
2017-07-24 17:35   ` Linus Torvalds
2017-07-25  8:17     ` Peter Zijlstra
2017-07-25 15:43       ` Linus Torvalds
2017-07-25 16:08         ` Peter Zijlstra
2017-07-25 11:50   ` Will Deacon
2017-07-24 15:16 ` [PATCH 3/3] lib/int_sqrt: Adjust comments Peter Zijlstra
2017-07-24 15:42 ` [PATCH 0/3] lib/int_sqrt: Fix, optimize and document Joe Perches

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