Eight Times Every Doubling

You time one function on random inputs of increasing size:

n wall time
1000 0.51 s
2000 4.03 s
4000 32.4 s

Assume the running time follows a power law T(n)≈anbT(n) \approx a n^b. What is bb, and how long should n=8000n = 8000 take?

A

b≈3b \approx 3, but three timings cannot fix aa, so no prediction is possible.

B

b=3b = 3, about 260 seconds.

C

b=2b = 2, about 130 seconds.

D

b=8b = 8, about 8,300 seconds.