How to squeeze more performance out of gcd?

Uknown sireeshkodali1 at gmail.com
Fri Jun 19 09:39:17 UTC 2020


On Monday, 15 June 2020 at 16:45:01 UTC, H. S. Teoh wrote:
> On Sat, Jun 13, 2020 at 02:25:21PM +0000, Uknown via 
> Digitalmars-d wrote: [...]
> [...]
> need to think about some way of reducing the number of gcd 
> calculations, since the gcd computation itself is already maxed 
> out in terms of optimization AFAICT.
>
>
> T

I didn't notice your reply, but if you haven't solved this yet, 
you could try this:

Make a simple recursive gcd implementation and memoize it. It 
might work better than any other implementation (depending on the 
numbers in question and the data set size)


More information about the Digitalmars-d mailing list