 A more efficient version of the algorithm shortcuts these steps, instead replacing the larger of the two numbers by its remainder when divided by the smaller of the two (with this version, the algorithm stops when reaching a zero remainder).With this improvement, the algorithm never requires more steps than five times the number of digits (base 10) of the smaller integer.This was proven by Gabriel Lamé in 1844, and marks the beginning of computational complexity theory.