Message228772
> it might be worth at least considering how a 'one or more parameter' gcd compares on performance grounds with a two parameter one.
There shouldn't be a difference in practice. The bulk of the work is in the algorithm that finds the GCD of two numbers, and finding the GCD of multiple numbers is simply
functools.reduce(math.gcd, seq_of_numbers)
Since the most common use case is finding the GCD of two numbers, I don't see a reason to burden the implementation with a special case here. |
|
| Date |
User |
Action |
Args |
| 2014-10-07 20:24:54 | scoder | set | recipients:
+ scoder, terry.reedy, mark.dickinson, vstinner, mrabarnett, steven.daprano, wolma, gladman, brg@gladman.plus.com |
| 2014-10-07 20:24:54 | scoder | set | messageid: <1412713494.79.0.492825409273.issue22477@psf.upfronthosting.co.za> |
| 2014-10-07 20:24:54 | scoder | link | issue22477 messages |
| 2014-10-07 20:24:54 | scoder | create | |
|