Stein's Algorithm for computing GCD The binary GCD algorithm, also known as Stein's algorithm, is an algorithm that computes the greatest common divisor of two nonnegative integers. Benchmark BenchmarkRecurse 10000000 292 ns/op BenchmarkIter 50000000 51.3 ns/op