Commit ed2787dc authored by Martin Reinecke's avatar Martin Reinecke

tweak benchmark code

parent 9fb21e4b
Pipeline #47046 passed with stages
in 16 minutes and 23 seconds
...@@ -11,10 +11,10 @@ np.random.seed(40) ...@@ -11,10 +11,10 @@ np.random.seed(40)
N0s, a0s, b0s, c0s = [], [], [], [] N0s, a0s, b0s, c0s = [], [], [], []
N1s, a1s, b1s, c1s = [], [], [], [] N1s, a1s, b1s, c1s = [], [], [], []
for ii in range(1, 8): for ii in range(10, 23):
nu = 1024 nu = 1024
nv = 1024 nv = 1024
N = int(10**ii) N = int(2**ii)
print('N = {}'.format(N)) print('N = {}'.format(N))
uv = np.random.rand(N, 2) - 0.5 uv = np.random.rand(N, 2) - 0.5
...@@ -70,6 +70,8 @@ print('FFT shape', res.shape) ...@@ -70,6 +70,8 @@ print('FFT shape', res.shape)
plt.scatter(N0s, a0s, label='Gridder mr') plt.scatter(N0s, a0s, label='Gridder mr')
plt.scatter(N1s, a1s, marker='^', label='NFFT') plt.scatter(N1s, a1s, marker='^', label='NFFT')
plt.legend() plt.legend()
# no idea why this is necessary, but if it is omitted, the range is wrong
plt.ylim(min(a0s+a1s), max(a0s+a1s))
plt.ylabel('time [s]') plt.ylabel('time [s]')
plt.title('Initialization') plt.title('Initialization')
plt.loglog() plt.loglog()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment