 This algorithm improves speed, because it reduces the number of operations on very large numbers and can use the speed of hardware arithmetic for most operations.In fact, most of the quotients are very small, so a fair number of steps of the Euclidean algorithm can be collected in a 2-by-2 matrix of single-word integers.When Lehmer's algorithm encounters a too large quotient, it must fall back to one iteration of Euclidean algorithm, with a Euclidean division of large numbers.