lkml.org 
[lkml]   [2009]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/8] add lib/gcd.c
Date
>>>>> "Alan" == Alan Cox <alan@lxorguk.ukuu.org.uk> 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 <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6


\
 
 \ /
  Last update: 2009-06-13 17:53    [W:0.051 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site