diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2026-11-14 19:16:45 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2026-11-14 19:16:45 +0100 |
| commit | 8e3088997f43fb02d9b657f7e9d32ddd44d7d940 (patch) | |
| tree | 37aa89e95abce52f612d0420a92ca725ccf2540b /benchmarks/benchmarks.md | |
| parent | 78dfb356bce3ebb9bbb537d2f95e35246ab9a427 (diff) | |
| download | nissy-core-8e3088997f43fb02d9b657f7e9d32ddd44d7d940.tar.gz nissy-core-8e3088997f43fb02d9b657f7e9d32ddd44d7d940.zip | |
Re-run benchmarks for H48 and add comparison with egg-solver
Diffstat (limited to 'benchmarks/benchmarks.md')
| -rw-r--r-- | benchmarks/benchmarks.md | 244 |
1 files changed, 150 insertions, 94 deletions
diff --git a/benchmarks/benchmarks.md b/benchmarks/benchmarks.md index baba515..4f36cac 100644 --- a/benchmarks/benchmarks.md +++ b/benchmarks/benchmarks.md | |||
| @@ -2,11 +2,18 @@ | |||
| 2 | 2 | ||
| 3 | This page contains some benchmarks for some of the possible | 3 | This page contains some benchmarks for some of the possible |
| 4 | configurations of the H48 optimal solver. For comparison we also | 4 | configurations of the H48 optimal solver. For comparison we also |
| 5 | include similar measurements for Andrew Skalski's impressive optimal | 5 | include similar measurements for two other optimal solvers: |
| 6 | solver [vcube](https://github.com/Voltara/vcube), which has been taken | 6 | |
| 7 | as a benchmark reference throughout the development of H48. The two | 7 | * Andrew Skalski's [vcube](https://github.com/Voltara/vcube), which |
| 8 | solvers differ both in method (although they both use an A* search) | 8 | is a truly impressive implementation of Tomas Rokicki's |
| 9 | and implementation. | 9 | [nxopt](https://github.com/rokicki/cube20src/blob/master/nxopt.md) |
| 10 | that has been taken as a reference throughout the development of H48. | ||
| 11 | This solver also uses an A* search, but the search is supported | ||
| 12 | by different pruning tables. | ||
| 13 | * Arhan Chaudhary's | ||
| 14 | [egg-solver](https://github.com/ArhanChaudhary/egg-solver), which | ||
| 15 | is an AI-generated implementation of the H48 method with | ||
| 16 | highly-optimized microthreading. | ||
| 10 | 17 | ||
| 11 | Similar benchmarks can be found: | 18 | Similar benchmarks can be found: |
| 12 | 19 | ||
| @@ -18,6 +25,8 @@ Similar benchmarks can be found: | |||
| 18 | * In Enrico Tenuti's [thesis](https://github.com/enricotenuti/h48thesis), | 25 | * In Enrico Tenuti's [thesis](https://github.com/enricotenuti/h48thesis), |
| 19 | also using an old implementation of H48, but including more data and | 26 | also using an old implementation of H48, but including more data and |
| 20 | nice plots. | 27 | nice plots. |
| 28 | * In [the documentation page](https://egg-solver/arhan.sh/docs/index.html) | ||
| 29 | for egg-solver. | ||
| 21 | 30 | ||
| 22 | ## Setting | 31 | ## Setting |
| 23 | 32 | ||
| @@ -43,8 +52,9 @@ All benchmark tests were done on the following configuration: | |||
| 43 | * CPU: AMD Ryzen 7 7700 (8 cores, 16 virtual threads) | 52 | * CPU: AMD Ryzen 7 7700 (8 cores, 16 virtual threads) |
| 44 | * Memory: 2x Corsair Vengeance 32GB 5600MHz | 53 | * Memory: 2x Corsair Vengeance 32GB 5600MHz |
| 45 | * Motherboard: Gigabyte B650M K | 54 | * Motherboard: Gigabyte B650M K |
| 46 | * Operating system: Debian 13 (Linux kernel 6.12.57) | 55 | * Operating system: Debian 13 (Linux kernel 6.12) |
| 47 | * Compiler: GCC 14.2.0 for H48 and Clang 19.1.7 for vcube | 56 | * Compilers: GCC 14.2.0 for H48, Chhang 19.1.7 for vcube and |
| 57 | cargo 1.99.1 for egg-solver | ||
| 48 | 58 | ||
| 49 | ## Benchmark results | 59 | ## Benchmark results |
| 50 | 60 | ||
| @@ -53,11 +63,11 @@ All benchmark tests were done on the following configuration: | |||
| 53 | The first test we performed was finding a single optimal solution, and | 63 | The first test we performed was finding a single optimal solution, and |
| 54 | we compared the results with vcube. | 64 | we compared the results with vcube. |
| 55 | 65 | ||
| 56 | This test was run in a single-thread configuration, because the two | 66 | This test was run in a single-thread configuration, because the three |
| 57 | solvers use very different strategies for multithreading: vcube can only | 67 | solvers use very different strategies for multithreading: vcube can only |
| 58 | parallelize by solving one cube per thread, while H48 is able to take | 68 | parallelize by solving one cube per thread, while H48 and egg-solver can |
| 59 | advantage of multiple threads even when solving a single cube. Therefore | 69 | take advantage of multiple threads even when solving a single cube. |
| 60 | we prefer to compare their single-threaded performance only. | 70 | Therefore we prefer to compare their single-threaded performance only. |
| 61 | 71 | ||
| 62 | Since the size of the pruning table used by the solver is of utmost | 72 | Since the size of the pruning table used by the solver is of utmost |
| 63 | importance, we include two statistics: time per cube and time per cube | 73 | importance, we include two statistics: time per cube and time per cube |
| @@ -67,40 +77,52 @@ leads to more even results across the board, although the speed of the | |||
| 67 | solvers of the same family does not scale exactly linearly with the size | 77 | solvers of the same family does not scale exactly linearly with the size |
| 68 | of the pruning table. | 78 | of the pruning table. |
| 69 | 79 | ||
| 70 | <!-- The following details block can be found in benchmarks/single_thread_comparison.md --> | 80 | <!-- The following details block can be found in benchmarks/tables_1_thread.md --> |
| 71 | <details><summary>Results: Single solution, single thread</summary> | 81 | <details><summary>Results: Single solution, single thread</summary> |
| 72 | 82 | ||
| 73 | Time per cube (in seconds, lower is better). | 83 | Time per cube (in seconds, lower is better). |
| 74 | 84 | ||
| 75 | | Solver | Size |17 moves|18 moves|19 moves|20 moves|Superflip| | 85 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 76 | |:---------|:-------|-------:|-------:|-------:|-------:|--------:| | 86 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 77 | |vcube 212 |58.2 GiB| 0.11| 0.75| 3.43| 27.28| 19.30| | 87 | |vcube 212 |58.2 GiB| 0.11| 0.75| 3.43| 27.28| 19.30| |
| 78 | |H48 h11 |56.5 GiB| 0.09| 0.50| 2.24| 15.73| 15.55| | 88 | |egg h11 |58.0 GiB| 0.01| 0.06| 0.24| 2.16| 0.14| |
| 89 | |H48 h11 |56.5 GiB| 0.08| 0.43| 1.86| 12.20| 15.39| | ||
| 79 | |vcube 404 |31.8 GiB| 0.23| 1.24| 6.10| 59.33| 268.26| | 90 | |vcube 404 |31.8 GiB| 0.23| 1.24| 6.10| 59.33| 268.26| |
| 80 | |H48 h10 |28.3 GiB| 0.15| 0.76| 3.36| 23.51| 38.05| | 91 | |egg h10 |29.0 GiB| 0.02| 0.10| 0.47| 4.00| 0.23| |
| 92 | |H48 h10 |28.3 GiB| 0.13| 0.69| 3.37| 23.15| 38.00| | ||
| 81 | |vcube 308 |21.2 GiB| 0.17| 1.02| 6.20| 58.70| 604.35| | 93 | |vcube 308 |21.2 GiB| 0.17| 1.02| 6.20| 58.70| 604.35| |
| 82 | |H48 h9 |14.1 GiB| 0.24| 1.48| 6.69| | | | 94 | |egg h9 |14.5 GiB| 0.03| 0.19| 0.91| | | |
| 95 | |H48 h9 |14.1 GiB| 0.22| 1.43| 6.56| | | | ||
| 83 | |vcube 208 | 7.3 GiB| 0.56| 4.36| 20.58| | | | 96 | |vcube 208 | 7.3 GiB| 0.56| 4.36| 20.58| | | |
| 84 | |H48 h8 | 7.1 GiB| 0.46| 3.36| 14.13| | | | 97 | |egg h8 | 7.2 GiB| 0.07| 0.39| 1.82| | | |
| 85 | |H48 h7 | 3.5 GiB| 0.63| 4.85| 23.25| | | | 98 | |H48 h8 | 7.1 GiB| 0.46| 3.43| 14.18| | | |
| 99 | |egg h7 | 3.6 GiB| 0.11| 0.81| 4.35| | | | ||
| 100 | |H48 h7 | 3.5 GiB| 0.63| 4.84| 23.31| | | | ||
| 86 | |vcube 112 | 2.4 GiB| 0.96| 9.29| 40.52| | | | 101 | |vcube 112 | 2.4 GiB| 0.96| 9.29| 40.52| | | |
| 87 | |H48 h6 | 1.8 GiB| 1.25| 9.45| 46.31| | | | 102 | |egg h6 | 1.8 GiB| 0.20| 1.53| 8.19| | | |
| 103 | |H48 h6 | 1.8 GiB| 1.26| 9.51| 47.14| | | | ||
| 88 | 104 | ||
| 89 | Time per cube adjusted for table size (in seconds \* GiB, lower is better). | 105 | Time per cube adjusted for table size (in seconds \* GiB, lower is better). |
| 90 | 106 | ||
| 91 | | Solver | Size |17 moves|18 moves|19 moves|20 moves|Superflip| | 107 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 92 | |:---------|:-------|-------:|-------:|-------:|-------:|--------:| | 108 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 93 | |vcube 212 |58.2 GiB| 6.43| 43.80| 199.38| 1587.43| 1122.73| | 109 | |vcube 212 |58.2 GiB| 6.43| 43.80| 199.38| 1587.43| 1122.73| |
| 94 | |H48 h11 |56.5 GiB| 5.21| 28.28| 126.68| 889.01| 878.77| | 110 | |egg h11 |58.0 GiB| 0.55| 3.31| 13.99| 125.17| 8.04| |
| 111 | |H48 h11 |56.5 GiB| 4.56| 24.55| 104.96| 689.22| 869.37| | ||
| 95 | |vcube 404 |31.8 GiB| 7.40| 39.47| 194.01| 1887.94| 8535.87| | 112 | |vcube 404 |31.8 GiB| 7.40| 39.47| 194.01| 1887.94| 8535.87| |
| 96 | |H48 h10 |28.3 GiB| 4.22| 21.37| 94.86| 664.22| 1075.08| | 113 | |egg h10 |29.0 GiB| 0.50| 2.90| 13.69| 115.88| 6.80| |
| 114 | |H48 h10 |28.3 GiB| 3.62| 19.45| 95.15| 654.05| 1073.69| | ||
| 97 | |vcube 308 |21.2 GiB| 3.51| 21.71| 131.50| 1245.26| 12819.94| | 115 | |vcube 308 |21.2 GiB| 3.51| 21.71| 131.50| 1245.26| 12819.94| |
| 98 | |H48 h9 |14.1 GiB| 3.34| 20.97| 94.57| | | | 116 | |egg h9 |14.5 GiB| 0.47| 2.74| 13.19| | | |
| 117 | |H48 h9 |14.1 GiB| 3.11| 20.18| 92.68| | | | ||
| 99 | |vcube 208 | 7.3 GiB| 4.08| 31.74| 149.68| | | | 118 | |vcube 208 | 7.3 GiB| 4.08| 31.74| 149.68| | | |
| 100 | |H48 h8 | 7.1 GiB| 3.25| 23.75| 99.82| | | | 119 | |egg h8 | 7.2 GiB| 0.48| 2.82| 13.16| | | |
| 101 | |H48 h7 | 3.5 GiB| 2.22| 17.12| 82.14| | | | 120 | |H48 h8 | 7.1 GiB| 3.23| 24.26| 100.15| | | |
| 121 | |egg h7 | 3.6 GiB| 0.39| 2.94| 15.77| | | | ||
| 122 | |H48 h7 | 3.5 GiB| 2.22| 17.12| 82.35| | | | ||
| 102 | |vcube 112 | 2.4 GiB| 2.33| 22.53| 98.23| | | | 123 | |vcube 112 | 2.4 GiB| 2.33| 22.53| 98.23| | | |
| 103 | |H48 h6 | 1.8 GiB| 2.21| 16.70| 81.86| | | | 124 | |egg h6 | 1.8 GiB| 0.36| 2.76| 14.83| | | |
| 125 | |H48 h6 | 1.8 GiB| 2.24| 16.80| 83.33| | | | ||
| 104 | 126 | ||
| 105 | <img src="img/17moves1thread.png"> | 127 | <img src="img/17moves1thread.png"> |
| 106 | <img src="img/18moves1thread.png"> | 128 | <img src="img/18moves1thread.png"> |
| @@ -108,9 +130,13 @@ Time per cube adjusted for table size (in seconds \* GiB, lower is better). | |||
| 108 | <img src="img/20moves1thread.png"> | 130 | <img src="img/20moves1thread.png"> |
| 109 | </details> | 131 | </details> |
| 110 | 132 | ||
| 111 | As we can see, adjusting for table size, H48 is generally faster than | 133 | As we can see, egg-solver is the clear winner, consistently beating H48 by |
| 112 | vcube. The gap between the two solvers is larger for scrambles with | 134 | factors of 5.3x-8.8x for 17-19 moves scrambles, comparing tables of similar |
| 113 | longer optimal solutions. | 135 | size. Moreover, egg-solver is more than 100 times faster when solving the |
| 136 | superflip configuration. | ||
| 137 | |||
| 138 | Adjusting for table size, H48 is generally faster than vcube. The gap between | ||
| 139 | the two solvers is larger for scrambles with longer optimal solutions. | ||
| 114 | 140 | ||
| 115 | ### Single solution, multiple threads | 141 | ### Single solution, multiple threads |
| 116 | 142 | ||
| @@ -118,36 +144,48 @@ The same benchmark as before is repeated using 4 and 16 threads (recall | |||
| 118 | that the CPU used for these tests has 8 physical cores and 16 virtual | 144 | that the CPU used for these tests has 8 physical cores and 16 virtual |
| 119 | threads). | 145 | threads). |
| 120 | 146 | ||
| 121 | As mentioned above, we don't compare these results to vcube. Instead, | 147 | For the reasons mentioned above, we will only compare H48 and egg-solver |
| 122 | we compare them with the single-threaded results for H48 and we show | 148 | in this section. |
| 123 | how far the speedup factor is from a theoretically optimal 4x and 16x. | ||
| 124 | 149 | ||
| 125 | <!-- The following details block can be found in benchmarks/tables_4_threads.md --> | 150 | <!-- The following details block can be found in benchmarks/tables_4_threads.md --> |
| 126 | <details><summary>Results: Single solution, 4 threads</summary> | 151 | <details><summary>Results: Single solution, 4 threads</summary> |
| 127 | 152 | ||
| 128 | Time per cube (in seconds, lower is better). | 153 | Time per cube (in seconds, lower is better). |
| 129 | 154 | ||
| 130 | | Solver | Size |17 moves|18 moves|19 moves|20 moves|Superflip| | 155 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 131 | |:---------|:-------|-------:|-------:|-------:|-------:|--------:| | 156 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 132 | |H48 h11 |56.5 GiB| 0.04| 0.14| 0.60| 3.97| 4.19| | 157 | |egg h11 |58.0 GiB| 0.00| 0.01| 0.06| 0.55| 0.03| |
| 133 | |H48 h10 |28.3 GiB| 0.05| 0.20| 0.91| 6.65| 9.81| | 158 | |H48 h11 |56.5 GiB| 0.03| 0.13| 0.50| 3.24| 4.17| |
| 134 | |H48 h9 |14.1 GiB| 0.07| 0.39| 1.74| 12.54| 18.96| | 159 | |egg h10 |29.0 GiB| 0.00| 0.03| 0.12| 1.05| 0.09| |
| 135 | |H48 h8 | 7.1 GiB| 0.13| 0.90| 3.71| | | | 160 | |H48 h10 |28.3 GiB| 0.05| 0.18| 0.90| 6.21| 9.85| |
| 136 | |H48 h7 | 3.5 GiB| 0.17| 1.28| 6.12| | | | 161 | |egg h9 |14.5 GiB| 0.01| 0.05| 0.23| | | |
| 137 | |H48 h6 | 1.8 GiB| 0.33| 2.47| 12.22| | | | 162 | |H48 h9 |14.1 GiB| 0.07| 0.39| 1.73| 12.50| 18.97| |
| 163 | |egg h8 | 7.2 GiB| 0.02| 0.10| 0.48| | | | ||
| 164 | |H48 h8 | 7.1 GiB| 0.13| 0.91| 3.71| | | | ||
| 165 | |egg h7 | 3.6 GiB| 0.03| 0.21| 1.11| | | | ||
| 166 | |H48 h7 | 3.5 GiB| 0.18| 1.29| 6.19| | | | ||
| 167 | |egg h6 | 1.8 GiB| 0.05| 0.39| 2.11| | | | ||
| 168 | |H48 h6 | 1.8 GiB| 0.34| 2.48| 12.33| | | | ||
| 138 | 169 | ||
| 139 | Speed-up factor (higher is better). | 170 | Speed-up factor (higher is better). |
| 140 | 171 | ||
| 141 | | Solver | Size |17 moves|18 moves|19 moves|20 moves|Superflip| | 172 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 142 | |:---------|:-------|-------:|-------:|-------:|-------:|--------:| | 173 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 143 | |H48 h11 |56.5 GiB| 2.55| 3.46| 3.75| 3.96| 3.71| | 174 | |egg h11 |58.0 GiB| 3.77| 3.90| 3.89| 3.93| 5.42| |
| 144 | |H48 h10 |28.3 GiB| 3.09| 3.71| 3.67| 3.54| 3.88| | 175 | |H48 h11 |56.5 GiB| 2.51| 3.44| 3.75| 3.77| 3.69| |
| 145 | |H48 h9 |14.1 GiB| 3.25| 3.84| 3.85| | | | 176 | |egg h10 |29.0 GiB| 3.88| 3.77| 3.98| 3.81| 2.72| |
| 146 | |H48 h8 | 7.1 GiB| 3.53| 3.72| 3.81| | | | 177 | |H48 h10 |28.3 GiB| 2.79| 3.91| 3.75| 3.73| 3.86| |
| 147 | |H48 h7 | 3.5 GiB| 3.60| 3.78| 3.80| | | | 178 | |egg h9 |14.5 GiB| 3.90| 3.87| 3.88| | | |
| 148 | |H48 h6 | 1.8 GiB| 3.77| 3.82| 3.79| | | | 179 | |H48 h9 |14.1 GiB| 3.18| 3.66| 3.79| | | |
| 180 | |egg h8 | 7.2 GiB| 3.87| 3.91| 3.81| | | | ||
| 181 | |H48 h8 | 7.1 GiB| 3.48| 3.78| 3.82| | | | ||
| 182 | |egg h7 | 3.6 GiB| 3.87| 3.87| 3.93| | | | ||
| 183 | |H48 h7 | 3.5 GiB| 3.43| 3.75| 3.77| | | | ||
| 184 | |egg h6 | 1.8 GiB| 3.98| 3.90| 3.87| | | | ||
| 185 | |H48 h6 | 1.8 GiB| 3.73| 3.84| 3.82| | | | ||
| 149 | 186 | ||
| 150 | <img src="img/4threadsspeedupfactor.png"> | 187 | <img src="img/H48_4_threads_speedup_factor.png"> |
| 188 | <img src="img/egg_4_threads_speedup_factor.png"> | ||
| 151 | 189 | ||
| 152 | </details> | 190 | </details> |
| 153 | 191 | ||
| @@ -156,74 +194,92 @@ Speed-up factor (higher is better). | |||
| 156 | 194 | ||
| 157 | Time per cube (in seconds, lower is better). | 195 | Time per cube (in seconds, lower is better). |
| 158 | 196 | ||
| 159 | | Solver | Size |17 moves|18 moves|19 moves|20 moves|Superflip| | 197 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 160 | |:---------|:-------|-------:|-------:|-------:|-------:|--------:| | 198 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 161 | |H48 h11 |56.5 GiB| 0.02| 0.06| 0.22| 1.33| 1.84| | 199 | |egg h11 |58.0 GiB| 0.00| 0.01| 0.03| 0.27| 0.02| |
| 162 | |H48 h10 |28.3 GiB| 0.03| 0.08| 0.33| 2.34| 4.18| | 200 | |H48 h11 |56.5 GiB| 0.02| 0.06| 0.21| 1.16| 1.84| |
| 163 | |H48 h9 |14.1 GiB| 0.04| 0.15| 0.64| 4.45| 8.09| | 201 | |egg h10 |29.0 GiB| 0.00| 0.02| 0.09| 0.77| 0.04| |
| 164 | |H48 h8 | 7.1 GiB| 0.06| 0.34| 1.36| | | | 202 | |H48 h10 |28.3 GiB| 0.03| 0.08| 0.34| 2.24| 4.21| |
| 165 | |H48 h7 | 3.5 GiB| 0.07| 0.47| 2.20| | | | 203 | |egg h9 |14.5 GiB| 0.01| 0.04| 0.17| | | |
| 166 | |H48 h6 | 1.8 GiB| 0.13| 0.91| 4.39| | | | 204 | |H48 h9 |14.1 GiB| 0.03| 0.14| 0.64| 4.43| 8.04| |
| 205 | |egg h8 | 7.2 GiB| 0.01| 0.07| 0.33| | | | ||
| 206 | |H48 h8 | 7.1 GiB| 0.06| 0.30| 1.36| | | | ||
| 207 | |egg h7 | 3.6 GiB| 0.02| 0.15| 0.79| | | | ||
| 208 | |H48 h7 | 3.5 GiB| 0.08| 0.41| 2.20| | | | ||
| 209 | |egg h6 | 1.8 GiB| 0.04| 0.28| 1.53| | | | ||
| 210 | |H48 h6 | 1.8 GiB| 0.13| 0.77| 4.37| | | | ||
| 167 | 211 | ||
| 168 | Speed-up factor (higher is better). | 212 | Speed-up factor (higher is better). |
| 169 | 213 | ||
| 170 | | Solver | Size |17 moves|18 moves|19 moves|20 moves|Superflip| | 214 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 171 | |:---------|:-------|-------:|-------:|-------:|-------:|--------:| | 215 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 172 | |H48 h11 |56.5 GiB| 3.90| 8.14| 10.39| 11.86| 8.45| | 216 | |egg h11 |58.0 GiB| 5.56| 8.03| 8.00| 8.05| 8.45| |
| 173 | |H48 h10 |28.3 GiB| 5.72| 9.00| 10.03| 10.04| 9.09| | 217 | |H48 h11 |56.5 GiB| 3.73| 7.32| 8.87| 10.54| 8.35| |
| 174 | |H48 h9 |14.1 GiB| 6.56| 9.75| 10.53| | | | 218 | |egg h10 |29.0 GiB| 5.63| 5.58| 5.53| 5.18| 6.05| |
| 175 | |H48 h8 | 7.1 GiB| 8.08| 9.91| 10.40| | | | 219 | |H48 h10 |28.3 GiB| 4.76| 8.60| 9.84| 10.34| 9.03| |
| 176 | |H48 h7 | 3.5 GiB| 8.59| 10.30| 10.57| | | | 220 | |egg h9 |14.5 GiB| 5.46| 5.32| 5.35| | | |
| 177 | |H48 h6 | 1.8 GiB| 9.60| 10.39| 10.54| | | | 221 | |H48 h9 |14.1 GiB| 6.34| 10.07| 10.19| | | |
| 222 | |egg h8 | 7.2 GiB| 5.49| 5.50| 5.53| | | | ||
| 223 | |H48 h8 | 7.1 GiB| 7.51| 11.36| 10.43| | | | ||
| 224 | |egg h7 | 3.6 GiB| 5.33| 5.38| 5.48| | | | ||
| 225 | |H48 h7 | 3.5 GiB| 8.21| 11.75| 10.61| | | | ||
| 226 | |egg h6 | 1.8 GiB| 5.51| 5.42| 5.35| | | | ||
| 227 | |H48 h6 | 1.8 GiB| 9.38| 12.31| 10.80| | | | ||
| 178 | 228 | ||
| 179 | <img src="img/16threadsspeedupfactor.png"> | 229 | <img src="img/H48_16_threads_speedup_factor.png"> |
| 230 | <img src="img/egg_16_threads_speedup_factor.png"> | ||
| 180 | 231 | ||
| 181 | </details> | 232 | </details> |
| 182 | 233 | ||
| 183 | We can see that H48 scales pretty well with 4 threads, getting close | 234 | We can see that both egg-solver and H48 scale pretty well with 4 threads, |
| 184 | to the 4x theoretical maximum speedup in slower cases (small table or | 235 | getting close to the 4x theoretical maximum speedup in slower cases |
| 185 | long solutions). | 236 | (small table or long solutions). egg-solver managed to beat the 4x |
| 237 | speedup for the superflip, likely due to single-scramble variance, i.e. | ||
| 238 | the thread that found the solution stopped earlier. | ||
| 186 | 239 | ||
| 187 | In the 16 threads benchmark shows that, although the virtual threads | 240 | In the 16 threads benchmark shows that, although the virtual threads |
| 188 | help push us beyond the 8x theoretical speedup that would be provided | 241 | help push H48 beyond the 8x theoretical speedup that would be provided |
| 189 | by the 8 cores, we are nowhere near a 16x speedup. | 242 | by the 8 cores, it is nowhere near a 16x speedup. egg-solver seems |
| 243 | stuck around 5.5x speedup. | ||
| 190 | 244 | ||
| 191 | ### All solutions | 245 | ### All solutions |
| 192 | 246 | ||
| 193 | Finally, we ran a test on finding *all* optimal solutions which, as | 247 | Finally, we ran a test on finding *all* optimal solutions which, as |
| 194 | far as I know, is a use case not supported by vcube. For convenience, | 248 | far as I know, is a use case not supported by vcube or egg-solver. |
| 195 | this test is only run on 16 threads. | 249 | For convenience, this test is only run on 16 threads. |
| 196 | 250 | ||
| 197 | <!-- The following details block can be found in benchmarks/all_solutions.md --> | 251 | <!-- The following details block can be found in benchmarks/tables_all_solutions.md --> |
| 198 | <details><summary>Results: All solutions (16 threads)</summary> | 252 | <details><summary>Results: All solutions, 16 threads</summary> |
| 199 | 253 | ||
| 200 | Time per cube (in seconds, lower is better). | 254 | Time per cube (in seconds, lower is better). |
| 201 | 255 | ||
| 202 | | Solver | Size |17 moves|18 moves|19 moves|20 moves|Superflip| | 256 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 203 | |:---------|:-------|-------:|-------:|-------:|-------:|--------:| | 257 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 204 | |H48 h11 |56.5 GiB| 0.04| 0.26| 2.22| 18.96| 16.95| | 258 | |H48 h11 |56.5 GiB| 0.04| 0.24| 1.88| 3.88| 1.86| |
| 205 | |H48 h10 |28.3 GiB| 0.05| 0.42| 3.82| 34.42| 36.80| | 259 | |H48 h10 |28.3 GiB| 0.05| 0.39| 3.51| 7.54| 4.29| |
| 206 | |H48 h9 |14.1 GiB| 0.08| 0.73| 7.28| | | | 260 | |H48 h9 |14.1 GiB| 0.08| 0.73| 6.92| | | |
| 207 | |H48 h8 | 7.1 GiB| 0.15| 1.56| 15.41| | | | 261 | |H48 h8 | 7.1 GiB| 0.16| 1.54| 14.78| | | |
| 208 | |H48 h7 | 3.5 GiB| 0.21| 2.38| 26.52| | | | 262 | |H48 h7 | 3.5 GiB| 0.22| 2.37| 25.35| | | |
| 209 | |H48 h6 | 1.8 GiB| 0.39| 4.67| 53.00| | | | 263 | |H48 h6 | 1.8 GiB| 0.40| 4.58| 50.17| | | |
| 210 | 264 | ||
| 211 | Time per cube adjusted for table size (in seconds \* GiB, lower is better). | 265 | Time per cube adjusted for table size (in seconds \* GiB, lower is better). |
| 212 | 266 | ||
| 213 | | Solver | Size |17 moves|18 moves|19 moves|20 moves|Superflip| | 267 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 214 | |:---------|:-------|-------:|-------:|-------:|-------:|--------:| | 268 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 215 | |H48 h11 |56.5 GiB| 2.11| 14.55| 125.21| 1071.23| 957.47| | 269 | |H48 h11 |56.5 GiB| 2.00| 13.40| 106.21| 219.43| 105.10| |
| 216 | |H48 h10 |28.3 GiB| 1.48| 11.96| 107.83| 972.35| 1039.73| | 270 | |H48 h10 |28.3 GiB| 1.45| 11.13| 99.17| 212.94| 121.20| |
| 217 | |H48 h9 |14.1 GiB| 1.08| 10.29| 102.88| | | | 271 | |H48 h9 |14.1 GiB| 1.13| 10.25| 97.80| | | |
| 218 | |H48 h8 | 7.1 GiB| 1.03| 10.99| 108.87| | | | 272 | |H48 h8 | 7.1 GiB| 1.10| 10.85| 104.41| | | |
| 219 | |H48 h7 | 3.5 GiB| 0.74| 8.41| 93.69| | | | 273 | |H48 h7 | 3.5 GiB| 0.79| 8.38| 89.57| | | |
| 220 | |H48 h6 | 1.8 GiB| 0.70| 8.25| 93.68| | | | 274 | |H48 h6 | 1.8 GiB| 0.71| 8.10| 88.68| | | |
| 221 | 275 | ||
| 222 | </details> | 276 | </details> |
| 223 | 277 | ||
| 224 | ## Other notes | 278 | ## Other notes |
| 225 | 279 | ||
| 226 | * To repeat the benchmarks, use `./benchmarks/run-h48-benchmarks.sh`. | 280 | * To repeat the benchmarks for H48, use `./benchmarks/run-h48-benchmarks.sh`. |
| 281 | Similar scripts for vcube and egg-solver can be found in the `benchmarks` | ||
| 282 | folder. | ||
| 227 | * All the measurements above exclude the time needed to load the pruning | 283 | * All the measurements above exclude the time needed to load the pruning |
| 228 | tables into memory, which can be quite significant for large tables. | 284 | tables into memory, which can be quite significant for large tables. |
| 229 | * The measurements also excluded the one-off computation of the pruning | 285 | * The measurements also excluded the one-off computation of the pruning |
