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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 6 03:44:35 PST 2013


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



--- Comment #3 from bearophile_hugs at eml.cc 2013-01-06 03:44:33 PST ---
(In reply to comment #2)

> I implemented this (exactly as you have it) and it was slower than the
> algorithm that is already there. I tested on all pairs of integers below
> 10,000, and also on the pairs (x^2, y) for all x,y < 10,000. At best it was 50%
> slower, at worst 3x slower.
> ...
> Maybe I'll look at this again in the future to try and make it faster, but it's
> pretty low on my priority list.

Thank you for doing some experiments. Once the experiments are conclusive, this
enhancement can be closed.

(Then at the moment a more important function for Phobos is an efficient GCD
for bigints.)

-- 
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