update plot to relative speed up

This commit is contained in:
ASPP Student 2024-08-30 12:27:32 +03:00
parent e69164e6f1
commit a7cd9e443f

View file

@ -11,6 +11,7 @@ for file in os.listdir('timings'):
timings.append(float(t)) timings.append(float(t))
threads = np.array(threads) threads = np.array(threads)
timings = np.array(timings) timings = np.array(timings)
timings /= timings[np.where(threads == 1)[0][0]]
print('This is the data I loaded: threads =', threads, ', timings =',timings) print('This is the data I loaded: threads =', threads, ', timings =',timings)
@ -21,7 +22,7 @@ fig, axs = plt.subplots()
# Feel free to make it pretty # Feel free to make it pretty
axs.plot(threads, timings, '*') axs.plot(threads, timings, '*')
axs.set_xlabel('number of threads') axs.set_xlabel('number of threads')
axs.set_ylabel('processing time') axs.set_ylabel('relative processing time to single threading')
plt.savefig('threads_v_timings.png', dpi=300) plt.savefig('threads_v_relative_timings.png', dpi=300)