[Issue 4125] std.numeric.gcd can use a binary GCD

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 8 06:42:54 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=4125


Artem Tarasov <lomereiter at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lomereiter at gmail.com


--- Comment #5 from Artem Tarasov <lomereiter at gmail.com> 2013-01-08 06:42:51 PST ---
(In reply to comment #0)
> std.numeric.gcd can use a faster Binary GCD algorithm, especially when the
> input type is unsigned. This page has both C code (and asm, but the C code is
> probably enough in many situations):
> 
> http://en.wikipedia.org/wiki/Binary_GCD_algorithm

Maybe instead of reinventing the wheel LibTomMath library should be used? It is
in public domain, has decent performance, and is stable enough to provide
implementation of big integers in TCL and Rubinius.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list