From: Peter Zijlstra <peterz@infradead.org>
To: torvalds@linux-foundation.org, akpm@linux-foundation.org
Cc: dave@stgolabs.net, aksgarg1989@gmail.com, tglx@linutronix.de,
mingo@kernel.org, will.deacon@arm.com, joe@perches.com,
peterz@infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] lib/int_sqrt: Fix, optimize and document
Date: Mon, 24 Jul 2017 17:16:30 +0200 [thread overview]
Message-ID: <20170724151630.447009076@infradead.org> (raw)
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.
next reply other threads:[~2017-07-24 15:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-24 15:16 Peter Zijlstra [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170724151630.447009076@infradead.org \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=aksgarg1989@gmail.com \
--cc=dave@stgolabs.net \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®