As I understand it, the Order of Complexity for multiplication is quadratic so if a multiply two 1-digit numbers together there will be 1 operation, two 2-digit numbers together there will be 4 operations, two 3-digit numbers 9 operations and so on.
I wanted to see this complexity by timing the execution of a program that simply multiplied two numbers together. Unexpectedly, regardless of the size of the numbers, the execution time is the same.
import time
num1 = 135
num2 = 342
start = time.time()
total = num1 * num2
finish = time.time()
elapsed = finish - start
print elapsed
So the result is 9.53674316406e-07
if I multiply two 3-digit numbers or two 30-digit numbers.
What is it that I'm misunderstanding?