Talk:Binary GCD algorithm: Difference between revisions

Content deleted Content added
Line 248:
 
This is terrrible because mostly the random number generator is being timed. [[User:McKay|McKay]] ([[User talk:McKay|talk]]) 07:56, 11 July 2012 (UTC)
 
RNGs are super slow. Also note that you only went up to numbers sized 2 ** 64, meaning that arithmetic operations will take constant time if you're on a 64 bit hardware/os/etc. To do an emperical comparison you should use a bigint library (eg, ints in Python) and test numbers which are >> your CPU's native ALU (or implement your own arithmetic routines so the processor is not used directly)
 
== Why (u | v) & 1 == 0 is the correct test ==