In [1]:
from heat_diffusion_experiment import python_version, cython_version, cython_parallel_version
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
%matplotlib inline
In [3]:
n = 200
In [4]:
A = cython_version(n)
plt.pcolormesh(np.linspace(0, 1, n) , np.linspace(0, 1, n) , A)
Out[4]:
In [5]:
%%timeit
python_version(n)
In [6]:
%%timeit
cython_version(n)
In [ ]:
# TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO
In [7]:
%%timeit
cython_parallel_version(n)
In [8]:
num_timesteps=100
In [9]:
%%timeit
cython_version(100,num_timesteps)
In [10]:
%%timeit
cython_parallel_version(100,num_timesteps)
In [11]:
%%timeit
cython_version(200,num_timesteps)
In [12]:
%%timeit
cython_parallel_version(200,num_timesteps)
In [13]:
%%timeit
cython_version(500,num_timesteps)
In [14]:
%%timeit
cython_parallel_version(500,num_timesteps)
In [15]:
%%timeit
cython_version(1000,num_timesteps)
In [16]:
%%timeit
cython_parallel_version(1000,num_timesteps)
In [17]:
%%timeit
cython_version(5000,num_timesteps)
In [18]:
%%timeit
cython_parallel_version(5000,num_timesteps)
In [19]:
%%timeit
cython_version(10000,num_timesteps)
In [20]:
%%timeit
cython_parallel_version(10000,num_timesteps)
In [6]:
%%timeit
cython_version(20000,num_timesteps)
In [5]:
%%timeit
cython_parallel_version(20000,num_timesteps)