Other approaches to calculate GCD of two numbers?

Can you tell me some other methods to calculate gcd of two numbers apart from long division method. Because I just want to compare how long division method is better than other approaches .

there is another approach to find gcd of two number.
Lets say we have two number a and b then the gcd of these two can be absolute difference of a and b (abs(a-b)) but if the absolute difference is not the gcd then once of the factors of the difference will be the gcd of a and b.

For eg
a=10 and b=15
diff=5 and 5 is divisor of both 10 and 15 therefore 5 will be the gcd.

if
a=18 b=22
diff=4 but 4 is not the divisor of 22 and 18 so we find the factors of 4
factors(4)=>2,2,1
now we take 2 and 2 is divisor of 18 and 22 therefore gcd of 18 and 22 will 2.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.