-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraph2.py
More file actions
28 lines (23 loc) · 905 Bytes
/
graph2.py
File metadata and controls
28 lines (23 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import numpy as np
import matplotlib.pyplot as plt
y_2_4096 = np.mean([14.824,15.093,16.019,15.002,14.513])
y_4_4096 = np.mean([14.618,13.153,13.239,13.107,13.164])
y_8_4096 = np.mean([9.997,10.092,10.167,9.894,10.126])
y_2_8192 = np.mean([60.514,58.321,61.391,61.335,66.583])
y_4_8192 = np.mean([51.519,51.008,51.273,51.188,51.289])
y_8_8192 = np.mean([38.641,39.679,39.348,39.447,38.905])
y_2_2048 = np.mean([3.989,3.952,4.001,3.943,3.958])
y_4_2048 = np.mean([3.474,3.467,3.477,3.498,3.567])
y_8_2048 = np.mean([2.575,2.578,2.595,2.625,2.654])
y_2048 = np.array([y_2_2048,y_4_2048,y_8_2048])
y_4096 = np.array([y_2_4096,y_4_4096,y_8_4096])
y_8192 = np.array([y_2_8192,y_4_8192,y_8_8192])
x = [2,4,8]
plt.plot(x,y_2048,"r")
plt.plot(x,y_4096,"b")
plt.plot(x,y_8192,"g")
plt.xlabel("number of threads")
plt.ylabel("time")
plt.title("plot")
plt.legend(["N = 2048","N = 4096","N = 8192"])
plt.show()