SHIFT = 15
BASE = 2 ** SHIFT
MASK = BASE - 1
+KARATSUBA_CUTOFF = 35 # from longobject.c
# Max number of base BASE digits to use in test cases. Doubling
-# this will at least quadruple the runtime.
-MAXDIGITS = 10
+# this will more than double the runtime.
+MAXDIGITS = 15
# build some special values
special = map(long, [0, 1, 2, BASE, BASE >> 1])
def test_division(maxdigits=MAXDIGITS):
if verbose:
print "long / * % divmod"
- digits = range(1, maxdigits+1)
+ digits = range(1, maxdigits+1) + range(KARATSUBA_CUTOFF,
+ KARATSUBA_CUTOFF + 15)
for lenx in digits:
x = getran(lenx)
for leny in digits: