Skip to content

Commit ac15dc2

Browse files
committed
Finalize script and updated main plot
1 parent ece3f91 commit ac15dc2

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

comparison/benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def time_stats(stmt=None, setup=None):
4444
return np.min(times) / number, np.mean(times) / number, np.median(times) / number
4545

4646

47-
FMT_HEADER = '# {:7s}' + ' {:10s}' * 8 + '\n'
48-
FMT = '{:9d}' + ' {:10.7e}' * 8 + '\n'
47+
FMT_HEADER = '# {:7s}' + ' {:10s}' * 12 + '\n'
48+
FMT = '{:9d}' + ' {:10.7e}' * 12 + '\n'
4949

5050
with open('benchmark_times.txt', 'w') as f:
5151

comparison/plot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
import matplotlib.pyplot as plt
55

66
(size,
7-
np_1d_mean, np_1d_std, fa_1d_mean, fa_1d_std,
8-
np_2d_mean, np_2d_std, fa_2d_mean, fa_2d_std) = np.loadtxt('benchmark_times.txt', unpack=True)
7+
np_1d_min, np_1d_mean, np_1d_median, fa_1d_min, fa_1d_mean, fa_1d_median,
8+
np_2d_min, np_2d_mean, np_2d_median, fa_2d_min, fa_2d_mean, fa_2d_median) = np.loadtxt('benchmark_times.txt', unpack=True)
99

1010
fig = plt.figure()
1111
ax = fig.add_subplot(1, 1, 1)
12-
ax.plot(size, np_1d_mean / fa_1d_mean, color=(34 / 255, 122 / 255, 181 / 255), label='1D')
13-
ax.plot(size, np_2d_mean / fa_2d_mean, color=(255 / 255, 133 / 255, 25 / 255), label='2D')
12+
ax.plot(size, np_1d_min / fa_1d_min, color=(34 / 255, 122 / 255, 181 / 255), label='1D')
13+
ax.plot(size, np_2d_min / fa_2d_min, color=(255 / 255, 133 / 255, 25 / 255), label='2D')
1414
ax.set_xscale('log')
1515
ax.set_xlim(0.3, 3e8)
1616
ax.set_ylim(1, 35)

speedup_compared.png

1.02 KB
Loading

0 commit comments

Comments
 (0)