aboutsummaryrefslogtreecommitdiff
path: root/stats
diff options
context:
space:
mode:
authorAbigail <abigail@abigail.be>2020-10-14 13:55:17 +0200
committerAbigail <abigail@abigail.be>2020-10-14 13:55:17 +0200
commitbf27525b9e6f6e315b1d5d7bdefdb406b6e7ad69 (patch)
tree01ccb6ffd3e4b349d28547c79d083889e9cdc9c4 /stats
parentdcbd9bc6855cb3e0e7eff458518a793408e0cfa1 (diff)
downloadperlweeklychallenge-club-bf27525b9e6f6e315b1d5d7bdefdb406b6e7ad69.tar.gz
perlweeklychallenge-club-bf27525b9e6f6e315b1d5d7bdefdb406b6e7ad69.tar.bz2
perlweeklychallenge-club-bf27525b9e6f6e315b1d5d7bdefdb406b6e7ad69.zip
Improve the performance of week 082/part 1.
Improved the running time of the algorithm from O (sqrt (gcd ($M, $N))) to O (sqrt (p) + |f| log |f|) where p is the largest prime factor of gcd ($M, $N), and |f| is total number of factors. This is not an improvement if the gcd is a prime, but a dramatic improvement if the gcd contains lots of prime factors.
Diffstat (limited to 'stats')
0 files changed, 0 insertions, 0 deletions