There are a couple of GCD algorithms that have better asymptotic performance than Euclid's (an old one is due to Knuth):
http://www.ams.org/journals/mcom/2008-77-261/S0025-5718-07-0...
I'm surprised the author didn't implement the binary gcd, however, although it has the same big-O as Euclid: https://en.wikipedia.org/wiki/Binary_GCD_algorithm