diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-06-19 22:51:48 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-06-19 22:51:48 +0200 |
| commit | c537e9c25d3dd2d6ef164af3effefb45007245b6 (patch) | |
| tree | 8f1cfd9f3f05d3c34207bab84f7f2dc3c0c9e5e2 | |
| parent | 05bae37d768fca39c478d682545fedeb76f35409 (diff) | |
| download | nissy-core-c537e9c25d3dd2d6ef164af3effefb45007245b6.tar.gz nissy-core-c537e9c25d3dd2d6ef164af3effefb45007245b6.zip | |
Added plots to benchmark
Diffstat (limited to '')
| -rw-r--r-- | benchmarks/benchmarks.md | 21 | ||||
| -rw-r--r-- | benchmarks/img/17moves16threads.png | bin | 0 -> 123996 bytes | |||
| -rw-r--r-- | benchmarks/img/17moves1thread.png | bin | 0 -> 101542 bytes | |||
| -rw-r--r-- | benchmarks/img/17moves4threads.png | bin | 0 -> 110248 bytes | |||
| -rw-r--r-- | benchmarks/img/18moves16threads.png | bin | 0 -> 115356 bytes | |||
| -rw-r--r-- | benchmarks/img/18moves1thread.png | bin | 0 -> 105535 bytes | |||
| -rw-r--r-- | benchmarks/img/18moves4threads.png | bin | 0 -> 102156 bytes | |||
| -rw-r--r-- | benchmarks/img/19moves16threads.png | bin | 0 -> 104002 bytes | |||
| -rw-r--r-- | benchmarks/img/19moves1thread.png | bin | 0 -> 107565 bytes | |||
| -rw-r--r-- | benchmarks/img/19moves4threads.png | bin | 0 -> 103209 bytes | |||
| -rw-r--r-- | benchmarks/img/20moves16threads.png | bin | 0 -> 106358 bytes | |||
| -rw-r--r-- | benchmarks/img/20moves1thread.png | bin | 0 -> 72029 bytes | |||
| -rw-r--r-- | benchmarks/img/20moves4threads.png | bin | 0 -> 113674 bytes | |||
| -rw-r--r-- | benchmarks/plot.py | 85 |
14 files changed, 106 insertions, 0 deletions
diff --git a/benchmarks/benchmarks.md b/benchmarks/benchmarks.md index 8170892..8504800 100644 --- a/benchmarks/benchmarks.md +++ b/benchmarks/benchmarks.md | |||
| @@ -97,6 +97,13 @@ Time per cube adjusted for tables size (in seconds \* GiB, lower is better). | |||
| 97 | |vcube 112 | 2.4GiB | 2.42 | 22.53 | | | | | 97 | |vcube 112 | 2.4GiB | 2.42 | 22.53 | | | | |
| 98 | |H48 h6 k2 | 1.8GiB | 4.10 | 30.40 | | | | | 98 | |H48 h6 k2 | 1.8GiB | 4.10 | 30.40 | | | | |
| 99 | 99 | ||
| 100 | <details><summary>Plots</summary> | ||
| 101 |  | ||
| 102 |  | ||
| 103 |  | ||
| 104 |  | ||
| 105 | </details> | ||
| 106 | |||
| 100 | ### Multithread (4 threads) | 107 | ### Multithread (4 threads) |
| 101 | 108 | ||
| 102 | Time per cube (in seconds, lower is better). | 109 | Time per cube (in seconds, lower is better). |
| @@ -129,6 +136,13 @@ Time per cube adjusted for tables size (in seconds \* GiB, lower is better). | |||
| 129 | |vcube 112 | 2.4GiB | 0.70 | 7.56 | 28.94 | | (a) | | 136 | |vcube 112 | 2.4GiB | 0.70 | 7.56 | 28.94 | | (a) | |
| 130 | |H48 h6 k2 | 1.8GiB | 1.17 | 8.62 | 43.04 | | | | 137 | |H48 h6 k2 | 1.8GiB | 1.17 | 8.62 | 43.04 | | | |
| 131 | 138 | ||
| 139 | <details><summary>Plots</summary> | ||
| 140 |  | ||
| 141 |  | ||
| 142 |  | ||
| 143 |  | ||
| 144 | </details> | ||
| 145 | |||
| 132 | (a) vcube cannot parallelize on a single scramble, the results for the | 146 | (a) vcube cannot parallelize on a single scramble, the results for the |
| 133 | Superflip are going to be the same as in the single thread case. | 147 | Superflip are going to be the same as in the single thread case. |
| 134 | 148 | ||
| @@ -164,6 +178,13 @@ Time per cube adjusted for tables size (in seconds \* GiB, lower is better). | |||
| 164 | |vcube 112 | 2.4GiB | 0.36 | 3.98 | 12.43 | | (a) | | 178 | |vcube 112 | 2.4GiB | 0.36 | 3.98 | 12.43 | | (a) | |
| 165 | |H48 h6 k2 | 1.8GiB | 0.38 | 2.75 | 14.08 | | | | 179 | |H48 h6 k2 | 1.8GiB | 0.38 | 2.75 | 14.08 | | | |
| 166 | 180 | ||
| 181 | <details><summary>Plots</summary> | ||
| 182 |  | ||
| 183 |  | ||
| 184 |  | ||
| 185 |  | ||
| 186 | </details> | ||
| 187 | |||
| 167 | (a) vcube cannot parallelize on a single scramble, the results for the | 188 | (a) vcube cannot parallelize on a single scramble, the results for the |
| 168 | Superflip are going to be the same as in the single thread case. | 189 | Superflip are going to be the same as in the single thread case. |
| 169 | 190 | ||
diff --git a/benchmarks/img/17moves16threads.png b/benchmarks/img/17moves16threads.png new file mode 100644 index 0000000..84a7cfb --- /dev/null +++ b/benchmarks/img/17moves16threads.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/17moves1thread.png b/benchmarks/img/17moves1thread.png new file mode 100644 index 0000000..09a13e5 --- /dev/null +++ b/benchmarks/img/17moves1thread.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/17moves4threads.png b/benchmarks/img/17moves4threads.png new file mode 100644 index 0000000..8507d67 --- /dev/null +++ b/benchmarks/img/17moves4threads.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/18moves16threads.png b/benchmarks/img/18moves16threads.png new file mode 100644 index 0000000..f16627d --- /dev/null +++ b/benchmarks/img/18moves16threads.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/18moves1thread.png b/benchmarks/img/18moves1thread.png new file mode 100644 index 0000000..ffde1f6 --- /dev/null +++ b/benchmarks/img/18moves1thread.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/18moves4threads.png b/benchmarks/img/18moves4threads.png new file mode 100644 index 0000000..62b82ed --- /dev/null +++ b/benchmarks/img/18moves4threads.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/19moves16threads.png b/benchmarks/img/19moves16threads.png new file mode 100644 index 0000000..3d4bb43 --- /dev/null +++ b/benchmarks/img/19moves16threads.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/19moves1thread.png b/benchmarks/img/19moves1thread.png new file mode 100644 index 0000000..5e668ad --- /dev/null +++ b/benchmarks/img/19moves1thread.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/19moves4threads.png b/benchmarks/img/19moves4threads.png new file mode 100644 index 0000000..7014c24 --- /dev/null +++ b/benchmarks/img/19moves4threads.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/20moves16threads.png b/benchmarks/img/20moves16threads.png new file mode 100644 index 0000000..cf197a6 --- /dev/null +++ b/benchmarks/img/20moves16threads.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/20moves1thread.png b/benchmarks/img/20moves1thread.png new file mode 100644 index 0000000..7084134 --- /dev/null +++ b/benchmarks/img/20moves1thread.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/20moves4threads.png b/benchmarks/img/20moves4threads.png new file mode 100644 index 0000000..7fb45cd --- /dev/null +++ b/benchmarks/img/20moves4threads.png | |||
| Binary files differ | |||
diff --git a/benchmarks/plot.py b/benchmarks/plot.py new file mode 100644 index 0000000..d07d11d --- /dev/null +++ b/benchmarks/plot.py | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | import matplotlib.pyplot as plt | ||
| 2 | |||
| 3 | h48 = [ | ||
| 4 | ("H48 h11 k2", 56.1, | ||
| 5 | [0.23, 1.15, 5.08, 31.30], | ||
| 6 | [0.06, 0.31, 1.31, 7.96], | ||
| 7 | [0.02, 0.1, 0.43, 2.48] | ||
| 8 | ), | ||
| 9 | ("H48 h10 k2", 28.1, | ||
| 10 | [0.34, 1.80, 7.77], | ||
| 11 | [0.1, 0.47, 2.00, 13.54], | ||
| 12 | [0.03, 0.16, 0.74, 4.43] | ||
| 13 | ), | ||
| 14 | ("H48 h9 k2", 14.1, | ||
| 15 | [0.42, 2.84, 12.86], | ||
| 16 | [0.14, 0.83, 3.82, 25.98], | ||
| 17 | [0.04, 0.26, 1.18, 8.31] | ||
| 18 | ), | ||
| 19 | ("H48 h8 k2", 7.1, | ||
| 20 | [0.86, 6.66, 27.4], | ||
| 21 | [0.27, 2.02, 7.94], | ||
| 22 | [0.08, 0.6, 2.48] | ||
| 23 | ), | ||
| 24 | ("H48 h7 k2", 3.6, | ||
| 25 | [1.47, 8.9, 42.46], | ||
| 26 | [0.35, 2.59, 12.41], | ||
| 27 | [0.11, 0.81, 3.91] | ||
| 28 | ), | ||
| 29 | ("H48 h6 k2", 1.8, | ||
| 30 | [2.28, 16.89], | ||
| 31 | [0.65, 4.79, 23.91], | ||
| 32 | [0.21, 1.53, 7.82] | ||
| 33 | ) | ||
| 34 | ] | ||
| 35 | |||
| 36 | vcube = [ | ||
| 37 | ("vcube 404", 31.8, | ||
| 38 | [0.3, 1.25, 6.87, 57.49], | ||
| 39 | [0.1, 0.38, 1.88, 16.98], | ||
| 40 | [0.03, 0.16, 0.67, 6.36] | ||
| 41 | ), | ||
| 42 | ("vcube 308", 21.2, | ||
| 43 | [0.2, 1.11, 6.92], | ||
| 44 | [0.06, 0.42, 1.95, 17.73], | ||
| 45 | [0.04, 0.26, 1.18, 9.53] | ||
| 46 | ), | ||
| 47 | ("vcube 208", 7.3, | ||
| 48 | [0.57, 4.41, 20.75], | ||
| 49 | [0.17, 1.49, 5.88], | ||
| 50 | [0.08, 0.8, 2.38] | ||
| 51 | ), | ||
| 52 | ("vcube 112", 2.4, | ||
| 53 | [1.01, 9.39], | ||
| 54 | [0.29, 3.15, 12.06], | ||
| 55 | [0.15, 1.66, 5.18] | ||
| 56 | ) | ||
| 57 | ] | ||
| 58 | |||
| 59 | h48_x = [i[1] for i in h48] | ||
| 60 | vcube_x = [i[1] for i in vcube] | ||
| 61 | |||
| 62 | def getarr(m, t, a): | ||
| 63 | return [i[2+t][m-17] for i in a if len(i[2+t]) > m-17] | ||
| 64 | |||
| 65 | def gethv(m, t): | ||
| 66 | return getarr(m, t, h48), getarr(m, t, vcube) | ||
| 67 | |||
| 68 | def showplt(plt, title, h48y, vcubey): | ||
| 69 | plt.clf() | ||
| 70 | plt.title(title) | ||
| 71 | plt.xlabel("Table size (GiB)") | ||
| 72 | plt.ylabel("Time to solve (s / cube)") | ||
| 73 | plt.plot(h48_x[:len(h48y)], h48y, "o--", label = "H48") | ||
| 74 | plt.plot(vcube_x[:len(vcubey)], vcubey, "o--", label = "vcube") | ||
| 75 | plt.legend(loc = "right") | ||
| 76 | filename = title.replace(" ", "").replace(",", "") + ".png" | ||
| 77 | plt.savefig("benchmarks/img/" + filename, dpi=300) | ||
| 78 | #plt.show() | ||
| 79 | |||
| 80 | for i in range(17, 21): | ||
| 81 | for j in range(0, 3): | ||
| 82 | title = "{} moves, {} thread{}".format( | ||
| 83 | i, 4**j, "s" if j > 0 else "") | ||
| 84 | h, v = gethv(i, j) | ||
| 85 | showplt(plt, title, h, v) | ||
