Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762223AbZFMPu6 (ORCPT ); Sat, 13 Jun 2009 11:50:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755115AbZFMPut (ORCPT ); Sat, 13 Jun 2009 11:50:49 -0400 Received: from eagle.jhcloos.com ([207.210.242.212]:4014 "EHLO eagle.jhcloos.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754923AbZFMPut (ORCPT ); Sat, 13 Jun 2009 11:50:49 -0400 From: James Cloos To: Alan Cox Cc: linux-kernel@vger.kernel.org, "Linux-MIPS" , Florian Fainelli , Andrew Morton , Takashi Iwai , Ralf Baechle Subject: Re: [PATCH 1/8] add lib/gcd.c In-Reply-To: <20090613162802.6c212505@lxorguk.ukuu.org.uk> (Alan Cox's message of "Sat, 13 Jun 2009 16:28:02 +0100") References: <200906041615.10467.florian@openwrt.org> <20090613162802.6c212505@lxorguk.ukuu.org.uk> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.92 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAI1J REFUOE+lU9ESgCAIg64P1y+ngUdxhl5H8wFbbM0OmUiEhKkCYaZThXCo6KE5sCbA1DDX3genvO4d eBQgEMaM5qy6uWk4SfBYfdu9jvBN9nSVDOKRtwb+I3epboOsOX5pZbJNsBJFvmQQ05YMfieIBnYX FK2N6dOawd97r/e8RjkTLzmMsiVgrAoEugtviCM3v2WzjgAAAABJRU5ErkJggg== Copyright: Copyright 2009 James Cloos OpenPGP: ED7DAEA6; url=http://jhcloos.com/public_key/0xED7DAEA6.asc OpenPGP-Fingerprint: E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6 Date: Sat, 13 Jun 2009 11:50:15 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 937 Lines: 19 >>>>> "Alan" == Alan Cox writes: >> Would the binary gcd algorithm not be a better fit for the kernel? Alan> Could well be the shift based one is better for some processors only. Very likely, I suspect. And the version of the euclid algo in that patch is better than most references that I've seen. (q=a/b;r=a%b; is common, probably because the texts use the same algo for computing the continued fraction.) In any case, I do not have the hardware to do any statistically significant testing; the closest I could do would be a speed test on hera, which I expect would be discouraged. -JimC -- James Cloos OpenPGP: 1024D/ED7DAEA6 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/