From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: zengzhaoxiu@163.com, akpm@linux-foundation.org,
linux@horizon.com, peterz@infradead.org
Cc: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com>,
Richard Henderson <rth@twiddle.net>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Matt Turner <mattst88@gmail.com>,
Russell King <linux@arm.linux.org.uk>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Geert Uytterhoeven <geert@linux-m68k.org>,
James Hogan <james.hogan@imgtec.com>,
Michal Simek <monstr@monstr.eu>,
Ralf Baechle <ralf@linux-mips.org>,
Ley Foon Tan <lftan@altera.com>, Jonas Bonn <jonas@southpole.se>,
"James E.J. Bottomley" <jejb@parisc-linux.org>,
Helge Deller <deller@gmx.de>, Chen Liqin <liqin.linux@gmail.com>,
Lennox Wu <lennox.wu@gmail.com>, Rich Felker <dalias@libc.org>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
uclinux-h8-devel@lists.sourceforge.jp,
linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org,
linux-mips@linux-mips.org, nios2-dev@lists.rocketboards.org,
linux@lists.openrisc.net, linux-parisc@vger.kernel.org,
linux-sh@vger.kernel.org, sparclinux@vger.kernel.org
Subject: Re: [patch V3] lib: GCD: add binary GCD algorithm
Date: Thu, 28 Apr 2016 10:22:50 -0700 [thread overview]
Message-ID: <1461864170.2307.19.camel@HansenPartnership.com> (raw)
In-Reply-To: <1461843824-19853-1-git-send-email-zengzhaoxiu@163.com>
On Thu, 2016-04-28 at 19:43 +0800, zengzhaoxiu@163.com wrote:
> From: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com>
>
> Because some architectures (alpha, armv6, etc.) don't provide
> hardware division, the mod operation is slow! Binary GCD algorithm
> uses simple arithmetic operations, it replaces division with
> arithmetic shifts, comparisons, and subtractions.
>
> I have compiled successfully with x86_64_defconfig and
> i386_defconfig.
What's the reason for wanting to optimize this and thus have to
maintain (and test) two separate code paths, which is a significant
expense? As far as I can see, gcd() is mosly used in finding optimal
clocks for operations, which is usually done at start of day and not
time critical.
James
next prev parent reply other threads:[~2016-04-28 17:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-28 11:43 [patch V3] lib: GCD: add binary GCD algorithm zengzhaoxiu
2016-04-28 12:18 ` kbuild test robot
2016-04-28 16:48 ` George Spelvin
2016-04-28 17:51 ` Geert Uytterhoeven
2016-04-28 17:51 ` Geert Uytterhoeven
2016-04-28 17:58 ` Rich Felker
2016-04-28 17:58 ` Rich Felker
2016-04-28 18:11 ` Geert Uytterhoeven
2016-04-28 18:11 ` Geert Uytterhoeven
2016-04-28 19:15 ` George Spelvin
2016-04-28 19:54 ` Sam Ravnborg
2016-04-28 17:10 ` Josh Juran
2016-04-28 17:22 ` James Bottomley [this message]
2016-05-20 10:27 ` kbuild test robot
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=1461864170.2307.19.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=akpm@linux-foundation.org \
--cc=dalias@libc.org \
--cc=davem@davemloft.net \
--cc=deller@gmx.de \
--cc=geert@linux-m68k.org \
--cc=ink@jurassic.park.msu.ru \
--cc=james.hogan@imgtec.com \
--cc=jejb@parisc-linux.org \
--cc=jonas@southpole.se \
--cc=lennox.wu@gmail.com \
--cc=lftan@altera.com \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-metag@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=linux@horizon.com \
--cc=linux@lists.openrisc.net \
--cc=liqin.linux@gmail.com \
--cc=mattst88@gmail.com \
--cc=monstr@monstr.eu \
--cc=nios2-dev@lists.rocketboards.org \
--cc=peterz@infradead.org \
--cc=ralf@linux-mips.org \
--cc=rth@twiddle.net \
--cc=sparclinux@vger.kernel.org \
--cc=uclinux-h8-devel@lists.sourceforge.jp \
--cc=ysato@users.sourceforge.jp \
--cc=zengzhaoxiu@163.com \
--cc=zhaoxiu.zeng@gmail.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