diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2026-11-22 17:09:58 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2026-11-22 17:09:58 +0100 |
| commit | d0f311a6dc9478de5202f861d7b4502c266c9005 (patch) | |
| tree | 0babe7724d7641ab25277e60099bf347214d64fa /benchmarks | |
| parent | 8e3088997f43fb02d9b657f7e9d32ddd44d7d940 (diff) | |
| download | nissy-core-d0f311a6dc9478de5202f861d7b4502c266c9005.tar.gz nissy-core-d0f311a6dc9478de5202f861d7b4502c266c9005.zip | |
Update benchmarks and commentbenchmark-egg
Diffstat (limited to '')
18 files changed, 233 insertions, 127 deletions
diff --git a/benchmarks/benchmarks.md b/benchmarks/benchmarks.md index 4f36cac..d6ec328 100644 --- a/benchmarks/benchmarks.md +++ b/benchmarks/benchmarks.md | |||
| @@ -4,16 +4,16 @@ 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 two other optimal solvers: | 5 | include similar measurements for two other optimal solvers: |
| 6 | 6 | ||
| 7 | * Andrew Skalski's [vcube](https://github.com/Voltara/vcube), which | 7 | * Andrew Skalski's [vcube](https://github.com/Voltara/vcube) (commit |
| 8 | is a truly impressive implementation of Tomas Rokicki's | 8 | 9f5bc2c), which is a truly impressive implementation of Tomas Rokicki's |
| 9 | [nxopt](https://github.com/rokicki/cube20src/blob/master/nxopt.md) | 9 | [nxopt](https://github.com/rokicki/cube20src/blob/master/nxopt.md) |
| 10 | that has been taken as a reference throughout the development of H48. | 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 | 11 | This solver also uses an A* search, but the search is supported |
| 12 | by different pruning tables. | 12 | by different pruning tables. |
| 13 | * Arhan Chaudhary's | 13 | * Arhan Chaudhary's |
| 14 | [egg-solver](https://github.com/ArhanChaudhary/egg-solver), which | 14 | [egg-solver](https://github.com/ArhanChaudhary/egg-solver) (commit |
| 15 | is an AI-generated implementation of the H48 method with | 15 | c3eb909), which is an AI-generated implementation of the H48 method |
| 16 | highly-optimized microthreading. | 16 | with highly-optimized microthreading. |
| 17 | 17 | ||
| 18 | Similar benchmarks can be found: | 18 | Similar benchmarks can be found: |
| 19 | 19 | ||
| @@ -25,7 +25,7 @@ Similar benchmarks can be found: | |||
| 25 | * In Enrico Tenuti's [thesis](https://github.com/enricotenuti/h48thesis), | 25 | * In Enrico Tenuti's [thesis](https://github.com/enricotenuti/h48thesis), |
| 26 | 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 |
| 27 | nice plots. | 27 | nice plots. |
| 28 | * In [the documentation page](https://egg-solver/arhan.sh/docs/index.html) | 28 | * In [the documentation page](https://egg-solver.arhan.sh/docs/index.html) |
| 29 | for egg-solver. | 29 | for egg-solver. |
| 30 | 30 | ||
| 31 | ## Setting | 31 | ## Setting |
| @@ -85,21 +85,21 @@ Time per cube (in seconds, lower is better). | |||
| 85 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| | 85 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 86 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 86 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 87 | |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| |
| 88 | |egg h11 |58.0 GiB| 0.01| 0.06| 0.24| 2.16| 0.14| | 88 | |egg h11 |58.0 GiB| 0.01| 0.06| 0.24| 2.14| 0.14| |
| 89 | |H48 h11 |56.5 GiB| 0.08| 0.43| 1.86| 12.20| 15.39| | 89 | |H48 h11 |56.5 GiB| 0.08| 0.43| 1.86| 12.20| 15.39| |
| 90 | |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| |
| 91 | |egg h10 |29.0 GiB| 0.02| 0.10| 0.47| 4.00| 0.23| | 91 | |egg h10 |29.0 GiB| 0.02| 0.10| 0.46| 3.96| 0.24| |
| 92 | |H48 h10 |28.3 GiB| 0.13| 0.69| 3.37| 23.15| 38.00| | 92 | |H48 h10 |28.3 GiB| 0.13| 0.69| 3.37| 23.15| 38.00| |
| 93 | |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| |
| 94 | |egg h9 |14.5 GiB| 0.03| 0.19| 0.91| | | | 94 | |egg h9 |14.5 GiB| 0.03| 0.21| 0.98| | | |
| 95 | |H48 h9 |14.1 GiB| 0.22| 1.43| 6.56| | | | 95 | |H48 h9 |14.1 GiB| 0.22| 1.43| 6.56| | | |
| 96 | |vcube 208 | 7.3 GiB| 0.56| 4.36| 20.58| | | | 96 | |vcube 208 | 7.3 GiB| 0.56| 4.36| 20.58| | | |
| 97 | |egg h8 | 7.2 GiB| 0.07| 0.39| 1.82| | | | 97 | |egg h8 | 7.2 GiB| 0.06| 0.36| 1.69| | | |
| 98 | |H48 h8 | 7.1 GiB| 0.46| 3.43| 14.18| | | | 98 | |H48 h8 | 7.1 GiB| 0.46| 3.43| 14.18| | | |
| 99 | |egg h7 | 3.6 GiB| 0.11| 0.81| 4.35| | | | 99 | |egg h7 | 3.6 GiB| 0.10| 0.74| 3.88| | | |
| 100 | |H48 h7 | 3.5 GiB| 0.63| 4.84| 23.31| | | | 100 | |H48 h7 | 3.5 GiB| 0.63| 4.84| 23.31| | | |
| 101 | |vcube 112 | 2.4 GiB| 0.96| 9.29| 40.52| | | | 101 | |vcube 112 | 2.4 GiB| 0.96| 9.29| 40.52| | | |
| 102 | |egg h6 | 1.8 GiB| 0.20| 1.53| 8.19| | | | 102 | |egg h6 | 1.8 GiB| 0.21| 1.60| 8.62| | | |
| 103 | |H48 h6 | 1.8 GiB| 1.26| 9.51| 47.14| | | | 103 | |H48 h6 | 1.8 GiB| 1.26| 9.51| 47.14| | | |
| 104 | 104 | ||
| 105 | 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). |
| @@ -107,21 +107,21 @@ Time per cube adjusted for table size (in seconds \* GiB, lower is better). | |||
| 107 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| | 107 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 108 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 108 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 109 | |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| |
| 110 | |egg h11 |58.0 GiB| 0.55| 3.31| 13.99| 125.17| 8.04| | 110 | |egg h11 |58.0 GiB| 0.55| 3.32| 13.97| 124.06| 7.93| |
| 111 | |H48 h11 |56.5 GiB| 4.56| 24.55| 104.96| 689.22| 869.37| | 111 | |H48 h11 |56.5 GiB| 4.56| 24.55| 104.96| 689.22| 869.37| |
| 112 | |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| |
| 113 | |egg h10 |29.0 GiB| 0.50| 2.90| 13.69| 115.88| 6.80| | 113 | |egg h10 |29.0 GiB| 0.48| 2.85| 13.48| 114.83| 7.08| |
| 114 | |H48 h10 |28.3 GiB| 3.62| 19.45| 95.15| 654.05| 1073.69| | 114 | |H48 h10 |28.3 GiB| 3.62| 19.45| 95.15| 654.05| 1073.69| |
| 115 | |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| |
| 116 | |egg h9 |14.5 GiB| 0.47| 2.74| 13.19| | | | 116 | |egg h9 |14.5 GiB| 0.50| 3.00| 14.22| | | |
| 117 | |H48 h9 |14.1 GiB| 3.11| 20.18| 92.68| | | | 117 | |H48 h9 |14.1 GiB| 3.11| 20.18| 92.68| | | |
| 118 | |vcube 208 | 7.3 GiB| 4.08| 31.74| 149.68| | | | 118 | |vcube 208 | 7.3 GiB| 4.08| 31.74| 149.68| | | |
| 119 | |egg h8 | 7.2 GiB| 0.48| 2.82| 13.16| | | | 119 | |egg h8 | 7.2 GiB| 0.45| 2.63| 12.27| | | |
| 120 | |H48 h8 | 7.1 GiB| 3.23| 24.26| 100.15| | | | 120 | |H48 h8 | 7.1 GiB| 3.23| 24.26| 100.15| | | |
| 121 | |egg h7 | 3.6 GiB| 0.39| 2.94| 15.77| | | | 121 | |egg h7 | 3.6 GiB| 0.36| 2.69| 14.05| | | |
| 122 | |H48 h7 | 3.5 GiB| 2.22| 17.12| 82.35| | | | 122 | |H48 h7 | 3.5 GiB| 2.22| 17.12| 82.35| | | |
| 123 | |vcube 112 | 2.4 GiB| 2.33| 22.53| 98.23| | | | 123 | |vcube 112 | 2.4 GiB| 2.33| 22.53| 98.23| | | |
| 124 | |egg h6 | 1.8 GiB| 0.36| 2.76| 14.83| | | | 124 | |egg h6 | 1.8 GiB| 0.37| 2.89| 15.62| | | |
| 125 | |H48 h6 | 1.8 GiB| 2.24| 16.80| 83.33| | | | 125 | |H48 h6 | 1.8 GiB| 2.24| 16.80| 83.33| | | |
| 126 | 126 | ||
| 127 | <img src="img/17moves1thread.png"> | 127 | <img src="img/17moves1thread.png"> |
| @@ -131,9 +131,10 @@ Time per cube adjusted for table size (in seconds \* GiB, lower is better). | |||
| 131 | </details> | 131 | </details> |
| 132 | 132 | ||
| 133 | As we can see, egg-solver is the clear winner, consistently beating H48 by | 133 | As we can see, egg-solver is the clear winner, consistently beating H48 by |
| 134 | factors of 5.3x-8.8x for 17-19 moves scrambles, comparing tables of similar | 134 | factors of 5x-9x for all sets of scrambles, comparing tables of similar |
| 135 | size. Moreover, egg-solver is more than 100 times faster when solving the | 135 | size. Moreover, egg-solver is more than 100 times faster when solving the |
| 136 | superflip configuration. | 136 | superflip configuration, likely due to better expoitation of symmetries, |
| 137 | including inverse positions. | ||
| 137 | 138 | ||
| 138 | Adjusting for table size, H48 is generally faster than vcube. The gap between | 139 | 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. | 140 | the two solvers is larger for scrambles with longer optimal solutions. |
| @@ -144,8 +145,9 @@ The same benchmark as before is repeated using 4 and 16 threads (recall | |||
| 144 | that the CPU used for these tests has 8 physical cores and 16 virtual | 145 | that the CPU used for these tests has 8 physical cores and 16 virtual |
| 145 | threads). | 146 | threads). |
| 146 | 147 | ||
| 147 | For the reasons mentioned above, we will only compare H48 and egg-solver | 148 | For the reasons mentioned above, in this section we will only compare H48 |
| 148 | in this section. | 149 | and egg-solver; for the latter with enable per-cube parallelization using |
| 150 | the `-c 1` option. | ||
| 149 | 151 | ||
| 150 | <!-- The following details block can be found in benchmarks/tables_4_threads.md --> | 152 | <!-- The following details block can be found in benchmarks/tables_4_threads.md --> |
| 151 | <details><summary>Results: Single solution, 4 threads</summary> | 153 | <details><summary>Results: Single solution, 4 threads</summary> |
| @@ -156,32 +158,32 @@ Time per cube (in seconds, lower is better). | |||
| 156 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 158 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 157 | |egg h11 |58.0 GiB| 0.00| 0.01| 0.06| 0.55| 0.03| | 159 | |egg h11 |58.0 GiB| 0.00| 0.01| 0.06| 0.55| 0.03| |
| 158 | |H48 h11 |56.5 GiB| 0.03| 0.13| 0.50| 3.24| 4.17| | 160 | |H48 h11 |56.5 GiB| 0.03| 0.13| 0.50| 3.24| 4.17| |
| 159 | |egg h10 |29.0 GiB| 0.00| 0.03| 0.12| 1.05| 0.09| | 161 | |egg h10 |29.0 GiB| 0.00| 0.02| 0.12| 1.02| 0.09| |
| 160 | |H48 h10 |28.3 GiB| 0.05| 0.18| 0.90| 6.21| 9.85| | 162 | |H48 h10 |28.3 GiB| 0.05| 0.18| 0.90| 6.21| 9.85| |
| 161 | |egg h9 |14.5 GiB| 0.01| 0.05| 0.23| | | | 163 | |egg h9 |14.5 GiB| 0.01| 0.05| 0.25| | | |
| 162 | |H48 h9 |14.1 GiB| 0.07| 0.39| 1.73| 12.50| 18.97| | 164 | |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| | | | 165 | |egg h8 | 7.2 GiB| 0.02| 0.09| 0.43| | | |
| 164 | |H48 h8 | 7.1 GiB| 0.13| 0.91| 3.71| | | | 166 | |H48 h8 | 7.1 GiB| 0.13| 0.91| 3.71| | | |
| 165 | |egg h7 | 3.6 GiB| 0.03| 0.21| 1.11| | | | 167 | |egg h7 | 3.6 GiB| 0.03| 0.19| 1.08| | | |
| 166 | |H48 h7 | 3.5 GiB| 0.18| 1.29| 6.19| | | | 168 | |H48 h7 | 3.5 GiB| 0.18| 1.29| 6.19| | | |
| 167 | |egg h6 | 1.8 GiB| 0.05| 0.39| 2.11| | | | 169 | |egg h6 | 1.8 GiB| 0.05| 0.39| 2.23| | | |
| 168 | |H48 h6 | 1.8 GiB| 0.34| 2.48| 12.33| | | | 170 | |H48 h6 | 1.8 GiB| 0.34| 2.48| 12.33| | | |
| 169 | 171 | ||
| 170 | Speed-up factor (higher is better). | 172 | Speed-up factor (higher is better). |
| 171 | 173 | ||
| 172 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| | 174 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 173 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 175 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 174 | |egg h11 |58.0 GiB| 3.77| 3.90| 3.89| 3.93| 5.42| | 176 | |egg h11 |58.0 GiB| 3.57| 3.85| 3.72| 3.90| 5.41| |
| 175 | |H48 h11 |56.5 GiB| 2.51| 3.44| 3.75| 3.77| 3.69| | 177 | |H48 h11 |56.5 GiB| 2.51| 3.44| 3.75| 3.77| 3.69| |
| 176 | |egg h10 |29.0 GiB| 3.88| 3.77| 3.98| 3.81| 2.72| | 178 | |egg h10 |29.0 GiB| 3.68| 4.03| 3.92| 3.89| 2.78| |
| 177 | |H48 h10 |28.3 GiB| 2.79| 3.91| 3.75| 3.73| 3.86| | 179 | |H48 h10 |28.3 GiB| 2.79| 3.91| 3.75| 3.73| 3.86| |
| 178 | |egg h9 |14.5 GiB| 3.90| 3.87| 3.88| | | | 180 | |egg h9 |14.5 GiB| 3.80| 4.20| 3.91| | | |
| 179 | |H48 h9 |14.1 GiB| 3.18| 3.66| 3.79| | | | 181 | |H48 h9 |14.1 GiB| 3.18| 3.66| 3.79| | | |
| 180 | |egg h8 | 7.2 GiB| 3.87| 3.91| 3.81| | | | 182 | |egg h8 | 7.2 GiB| 3.81| 4.01| 3.91| | | |
| 181 | |H48 h8 | 7.1 GiB| 3.48| 3.78| 3.82| | | | 183 | |H48 h8 | 7.1 GiB| 3.48| 3.78| 3.82| | | |
| 182 | |egg h7 | 3.6 GiB| 3.87| 3.87| 3.93| | | | 184 | |egg h7 | 3.6 GiB| 3.81| 3.88| 3.59| | | |
| 183 | |H48 h7 | 3.5 GiB| 3.43| 3.75| 3.77| | | | 185 | |H48 h7 | 3.5 GiB| 3.43| 3.75| 3.77| | | |
| 184 | |egg h6 | 1.8 GiB| 3.98| 3.90| 3.87| | | | 186 | |egg h6 | 1.8 GiB| 3.93| 4.09| 3.87| | | |
| 185 | |H48 h6 | 1.8 GiB| 3.73| 3.84| 3.82| | | | 187 | |H48 h6 | 1.8 GiB| 3.73| 3.84| 3.82| | | |
| 186 | 188 | ||
| 187 | <img src="img/H48_4_threads_speedup_factor.png"> | 189 | <img src="img/H48_4_threads_speedup_factor.png"> |
| @@ -196,34 +198,34 @@ Time per cube (in seconds, lower is better). | |||
| 196 | 198 | ||
| 197 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| | 199 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 198 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 200 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 199 | |egg h11 |58.0 GiB| 0.00| 0.01| 0.03| 0.27| 0.02| | 201 | |egg h11 |58.0 GiB| 0.00| 0.01| 0.03| 0.28| 0.02| |
| 200 | |H48 h11 |56.5 GiB| 0.02| 0.06| 0.21| 1.16| 1.84| | 202 | |H48 h11 |56.5 GiB| 0.02| 0.06| 0.21| 1.16| 1.84| |
| 201 | |egg h10 |29.0 GiB| 0.00| 0.02| 0.09| 0.77| 0.04| | 203 | |egg h10 |29.0 GiB| 0.00| 0.01| 0.06| 0.50| 0.03| |
| 202 | |H48 h10 |28.3 GiB| 0.03| 0.08| 0.34| 2.24| 4.21| | 204 | |H48 h10 |28.3 GiB| 0.03| 0.08| 0.34| 2.24| 4.21| |
| 203 | |egg h9 |14.5 GiB| 0.01| 0.04| 0.17| | | | 205 | |egg h9 |14.5 GiB| 0.00| 0.02| 0.11| | | |
| 204 | |H48 h9 |14.1 GiB| 0.03| 0.14| 0.64| 4.43| 8.04| | 206 | |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| | | | 207 | |egg h8 | 7.2 GiB| 0.01| 0.04| 0.21| | | |
| 206 | |H48 h8 | 7.1 GiB| 0.06| 0.30| 1.36| | | | 208 | |H48 h8 | 7.1 GiB| 0.06| 0.30| 1.36| | | |
| 207 | |egg h7 | 3.6 GiB| 0.02| 0.15| 0.79| | | | 209 | |egg h7 | 3.6 GiB| 0.01| 0.09| 0.53| | | |
| 208 | |H48 h7 | 3.5 GiB| 0.08| 0.41| 2.20| | | | 210 | |H48 h7 | 3.5 GiB| 0.08| 0.41| 2.20| | | |
| 209 | |egg h6 | 1.8 GiB| 0.04| 0.28| 1.53| | | | 211 | |egg h6 | 1.8 GiB| 0.02| 0.18| 0.97| | | |
| 210 | |H48 h6 | 1.8 GiB| 0.13| 0.77| 4.37| | | | 212 | |H48 h6 | 1.8 GiB| 0.13| 0.77| 4.37| | | |
| 211 | 213 | ||
| 212 | Speed-up factor (higher is better). | 214 | Speed-up factor (higher is better). |
| 213 | 215 | ||
| 214 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| | 216 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 215 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 217 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 216 | |egg h11 |58.0 GiB| 5.56| 8.03| 8.00| 8.05| 8.45| | 218 | |egg h11 |58.0 GiB| 6.27| 7.35| 7.59| 7.76| 7.61| |
| 217 | |H48 h11 |56.5 GiB| 3.73| 7.32| 8.87| 10.54| 8.35| | 219 | |H48 h11 |56.5 GiB| 3.73| 7.32| 8.87| 10.54| 8.35| |
| 218 | |egg h10 |29.0 GiB| 5.63| 5.58| 5.53| 5.18| 6.05| | 220 | |egg h10 |29.0 GiB| 6.86| 8.10| 8.02| 7.92| 7.13| |
| 219 | |H48 h10 |28.3 GiB| 4.76| 8.60| 9.84| 10.34| 9.03| | 221 | |H48 h10 |28.3 GiB| 4.76| 8.60| 9.84| 10.34| 9.03| |
| 220 | |egg h9 |14.5 GiB| 5.46| 5.32| 5.35| | | | 222 | |egg h9 |14.5 GiB| 7.84| 9.10| 8.56| | | |
| 221 | |H48 h9 |14.1 GiB| 6.34| 10.07| 10.19| | | | 223 | |H48 h9 |14.1 GiB| 6.34| 10.07| 10.19| | | |
| 222 | |egg h8 | 7.2 GiB| 5.49| 5.50| 5.53| | | | 224 | |egg h8 | 7.2 GiB| 7.71| 8.36| 8.04| | | |
| 223 | |H48 h8 | 7.1 GiB| 7.51| 11.36| 10.43| | | | 225 | |H48 h8 | 7.1 GiB| 7.51| 11.36| 10.43| | | |
| 224 | |egg h7 | 3.6 GiB| 5.33| 5.38| 5.48| | | | 226 | |egg h7 | 3.6 GiB| 8.00| 8.15| 7.32| | | |
| 225 | |H48 h7 | 3.5 GiB| 8.21| 11.75| 10.61| | | | 227 | |H48 h7 | 3.5 GiB| 8.21| 11.75| 10.61| | | |
| 226 | |egg h6 | 1.8 GiB| 5.51| 5.42| 5.35| | | | 228 | |egg h6 | 1.8 GiB| 8.62| 8.96| 8.89| | | |
| 227 | |H48 h6 | 1.8 GiB| 9.38| 12.31| 10.80| | | | 229 | |H48 h6 | 1.8 GiB| 9.38| 12.31| 10.80| | | |
| 228 | 230 | ||
| 229 | <img src="img/H48_16_threads_speedup_factor.png"> | 231 | <img src="img/H48_16_threads_speedup_factor.png"> |
| @@ -237,15 +239,17 @@ getting close to the 4x theoretical maximum speedup in slower cases | |||
| 237 | speedup for the superflip, likely due to single-scramble variance, i.e. | 239 | speedup for the superflip, likely due to single-scramble variance, i.e. |
| 238 | the thread that found the solution stopped earlier. | 240 | the thread that found the solution stopped earlier. |
| 239 | 241 | ||
| 240 | In the 16 threads benchmark shows that, although the virtual threads | 242 | The 16 threads benchmark shows that, although the virtual threads help |
| 241 | help push H48 beyond the 8x theoretical speedup that would be provided | 243 | push H48 beyond the 8x theoretical speedup that would be provided by the |
| 242 | by the 8 cores, it is nowhere near a 16x speedup. egg-solver seems | 244 | 8 cores, it is nowhere near a 16x speedup. Moreover, egg-solver does not |
| 243 | stuck around 5.5x speedup. | 245 | seem to take advantage of the CPU's hyperthreading, likely because its |
| 246 | own custom micro-threading is based on the same principle and it saturates | ||
| 247 | any possible speedup that hyperthreading could provide. | ||
| 244 | 248 | ||
| 245 | ### All solutions | 249 | ### All solutions |
| 246 | 250 | ||
| 247 | Finally, we ran a test on finding *all* optimal solutions which, as | 251 | Finally, we ran a test on finding *all* optimal solutions which, as |
| 248 | far as I know, is a use case not supported by vcube or egg-solver. | 252 | far as I know, is a use case only supported by H48 and egg-solver. |
| 249 | For convenience, this test is only run on 16 threads. | 253 | For convenience, this test is only run on 16 threads. |
| 250 | 254 | ||
| 251 | <!-- The following details block can be found in benchmarks/tables_all_solutions.md --> | 255 | <!-- The following details block can be found in benchmarks/tables_all_solutions.md --> |
| @@ -255,26 +259,46 @@ Time per cube (in seconds, lower is better). | |||
| 255 | 259 | ||
| 256 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| | 260 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 257 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 261 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 262 | |egg h11 |58.0 GiB| 0.00| 0.05| 0.54| 5.08| 15.38| | ||
| 258 | |H48 h11 |56.5 GiB| 0.04| 0.24| 1.88| 3.88| 1.86| | 263 | |H48 h11 |56.5 GiB| 0.04| 0.24| 1.88| 3.88| 1.86| |
| 264 | |egg h10 |29.0 GiB| 0.01| 0.09| 1.00| 9.42| 31.05| | ||
| 259 | |H48 h10 |28.3 GiB| 0.05| 0.39| 3.51| 7.54| 4.29| | 265 | |H48 h10 |28.3 GiB| 0.05| 0.39| 3.51| 7.54| 4.29| |
| 266 | |egg h9 |14.5 GiB| 0.01| 0.17| 1.97| | | | ||
| 260 | |H48 h9 |14.1 GiB| 0.08| 0.73| 6.92| | | | 267 | |H48 h9 |14.1 GiB| 0.08| 0.73| 6.92| | | |
| 268 | |egg h8 | 7.2 GiB| 0.03| 0.31| 3.49| | | | ||
| 261 | |H48 h8 | 7.1 GiB| 0.16| 1.54| 14.78| | | | 269 | |H48 h8 | 7.1 GiB| 0.16| 1.54| 14.78| | | |
| 270 | |egg h7 | 3.6 GiB| 0.04| 0.57| 6.38| | | | ||
| 262 | |H48 h7 | 3.5 GiB| 0.22| 2.37| 25.35| | | | 271 | |H48 h7 | 3.5 GiB| 0.22| 2.37| 25.35| | | |
| 272 | |egg h6 | 1.8 GiB| 0.10| 1.27| 14.93| | | | ||
| 263 | |H48 h6 | 1.8 GiB| 0.40| 4.58| 50.17| | | | 273 | |H48 h6 | 1.8 GiB| 0.40| 4.58| 50.17| | | |
| 264 | 274 | ||
| 265 | Time per cube adjusted for table size (in seconds \* GiB, lower is better). | 275 | Time per cube adjusted for table size (in seconds \* GiB, lower is better). |
| 266 | 276 | ||
| 267 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| | 277 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 268 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 278 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 279 | |egg h11 |58.0 GiB| 0.25| 2.88| 31.12| 294.67| 892.07| | ||
| 269 | |H48 h11 |56.5 GiB| 2.00| 13.40| 106.21| 219.43| 105.10| | 280 | |H48 h11 |56.5 GiB| 2.00| 13.40| 106.21| 219.43| 105.10| |
| 281 | |egg h10 |29.0 GiB| 0.22| 2.58| 28.89| 273.08| 900.34| | ||
| 270 | |H48 h10 |28.3 GiB| 1.45| 11.13| 99.17| 212.94| 121.20| | 282 | |H48 h10 |28.3 GiB| 1.45| 11.13| 99.17| 212.94| 121.20| |
| 283 | |egg h9 |14.5 GiB| 0.21| 2.51| 28.49| | | | ||
| 271 | |H48 h9 |14.1 GiB| 1.13| 10.25| 97.80| | | | 284 | |H48 h9 |14.1 GiB| 1.13| 10.25| 97.80| | | |
| 285 | |egg h8 | 7.2 GiB| 0.18| 2.25| 25.30| | | | ||
| 272 | |H48 h8 | 7.1 GiB| 1.10| 10.85| 104.41| | | | 286 | |H48 h8 | 7.1 GiB| 1.10| 10.85| 104.41| | | |
| 287 | |egg h7 | 3.6 GiB| 0.16| 2.05| 23.11| | | | ||
| 273 | |H48 h7 | 3.5 GiB| 0.79| 8.38| 89.57| | | | 288 | |H48 h7 | 3.5 GiB| 0.79| 8.38| 89.57| | | |
| 289 | |egg h6 | 1.8 GiB| 0.18| 2.29| 27.06| | | | ||
| 274 | |H48 h6 | 1.8 GiB| 0.71| 8.10| 88.68| | | | 290 | |H48 h6 | 1.8 GiB| 0.71| 8.10| 88.68| | | |
| 275 | 291 | ||
| 292 | <img src="img/17movesallsolutions16threads.png"> | ||
| 293 | <img src="img/18movesallsolutions16threads.png"> | ||
| 294 | <img src="img/19movesallsolutions16threads.png"> | ||
| 295 | <img src="img/20movesallsolutions16threads.png"> | ||
| 296 | |||
| 276 | </details> | 297 | </details> |
| 277 | 298 | ||
| 299 | For all-solutions egg-solver's advantage reduces to 3x-4x, and for | ||
| 300 | 20 moves scrambles it appears to be even slower than H48. | ||
| 301 | |||
| 278 | ## Other notes | 302 | ## Other notes |
| 279 | 303 | ||
| 280 | * To repeat the benchmarks for H48, use `./benchmarks/run-h48-benchmarks.sh`. | 304 | * To repeat the benchmarks for H48, use `./benchmarks/run-h48-benchmarks.sh`. |
| @@ -291,6 +315,7 @@ Time per cube adjusted for table size (in seconds \* GiB, lower is better). | |||
| 291 | them. Both apporaches have pros and cons: vcube's approch has less | 315 | them. Both apporaches have pros and cons: vcube's approch has less |
| 292 | overhead in coordination between the threads, but often some threads | 316 | overhead in coordination between the threads, but often some threads |
| 293 | may be left without work when there are no more cubes left to solve. | 317 | may be left without work when there are no more cubes left to solve. |
| 318 | egg-solver supports both modes via the `-c` option. | ||
| 294 | * Per-cube parallelization means that H48 will always be faster than | 319 | * Per-cube parallelization means that H48 will always be faster than |
| 295 | vcube when solving a single cube. | 320 | vcube when solving a single cube. |
| 296 | * vcube only supports x86 processors (Intel, AMD), while H48 runs on any | 321 | * vcube only supports x86 processors (Intel, AMD), while H48 runs on any |
diff --git a/benchmarks/img/17moves1thread.png b/benchmarks/img/17moves1thread.png index 1ade3f3..c5a4db0 100644 --- a/benchmarks/img/17moves1thread.png +++ b/benchmarks/img/17moves1thread.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/17movesallsolutions16threads.png b/benchmarks/img/17movesallsolutions16threads.png new file mode 100644 index 0000000..b28595f --- /dev/null +++ b/benchmarks/img/17movesallsolutions16threads.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/18moves1thread.png b/benchmarks/img/18moves1thread.png index 0281d4f..71e41cc 100644 --- a/benchmarks/img/18moves1thread.png +++ b/benchmarks/img/18moves1thread.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/18movesallsolutions16threads.png b/benchmarks/img/18movesallsolutions16threads.png new file mode 100644 index 0000000..d7b4779 --- /dev/null +++ b/benchmarks/img/18movesallsolutions16threads.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/19moves1thread.png b/benchmarks/img/19moves1thread.png index 17c0d46..b70eb9e 100644 --- a/benchmarks/img/19moves1thread.png +++ b/benchmarks/img/19moves1thread.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/19movesallsolutions16threads.png b/benchmarks/img/19movesallsolutions16threads.png new file mode 100644 index 0000000..ba0ebea --- /dev/null +++ b/benchmarks/img/19movesallsolutions16threads.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/20moves1thread.png b/benchmarks/img/20moves1thread.png index 7ed910f..6f058a0 100644 --- a/benchmarks/img/20moves1thread.png +++ b/benchmarks/img/20moves1thread.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/20movesallsolutions16threads.png b/benchmarks/img/20movesallsolutions16threads.png new file mode 100644 index 0000000..6058304 --- /dev/null +++ b/benchmarks/img/20movesallsolutions16threads.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/egg_16_threads_speedup_factor.png b/benchmarks/img/egg_16_threads_speedup_factor.png index 3c4a81b..4977092 100644 --- a/benchmarks/img/egg_16_threads_speedup_factor.png +++ b/benchmarks/img/egg_16_threads_speedup_factor.png | |||
| Binary files differ | |||
diff --git a/benchmarks/img/egg_4_threads_speedup_factor.png b/benchmarks/img/egg_4_threads_speedup_factor.png index a00746a..648ce55 100644 --- a/benchmarks/img/egg_4_threads_speedup_factor.png +++ b/benchmarks/img/egg_4_threads_speedup_factor.png | |||
| Binary files differ | |||
diff --git a/benchmarks/plot-benchmarks.py b/benchmarks/plot-benchmarks.py index dfd1f90..e72e13b 100644 --- a/benchmarks/plot-benchmarks.py +++ b/benchmarks/plot-benchmarks.py | |||
| @@ -185,9 +185,9 @@ with open(benchmarks_4_threads, "w") as f: | |||
| 185 | ) | 185 | ) |
| 186 | f.write("\n") | 186 | f.write("\n") |
| 187 | f.write( | 187 | f.write( |
| 188 | '<img src="img/H48_4_threads_speedup_factor.png">\n' | 188 | '<img src="img/H48_4_threads_speedup_factor.png">\n' |
| 189 | '<img src="img/egg_4_threads_speedup_factor.png">\n' | 189 | '<img src="img/egg_4_threads_speedup_factor.png">\n' |
| 190 | ) | 190 | ) |
| 191 | f.write("\n") | 191 | f.write("\n") |
| 192 | f.write("</details>\n") | 192 | f.write("</details>\n") |
| 193 | 193 | ||
| @@ -223,9 +223,9 @@ with open(benchmarks_16_threads, "w") as f: | |||
| 223 | ) | 223 | ) |
| 224 | f.write("\n") | 224 | f.write("\n") |
| 225 | f.write( | 225 | f.write( |
| 226 | '<img src="img/H48_16_threads_speedup_factor.png">\n' | 226 | '<img src="img/H48_16_threads_speedup_factor.png">\n' |
| 227 | '<img src="img/egg_16_threads_speedup_factor.png">\n' | 227 | '<img src="img/egg_16_threads_speedup_factor.png">\n' |
| 228 | ) | 228 | ) |
| 229 | f.write("\n") | 229 | f.write("\n") |
| 230 | f.write("</details>\n") | 230 | f.write("</details>\n") |
| 231 | 231 | ||
| @@ -241,14 +241,35 @@ with open(benchmarks_all_solutions, "w") as f: | |||
| 241 | f.write("\n") | 241 | f.write("\n") |
| 242 | f.write("Time per cube (in seconds, lower is better).\n") | 242 | f.write("Time per cube (in seconds, lower is better).\n") |
| 243 | f.write("\n") | 243 | f.write("\n") |
| 244 | print_table(f, results_h48.h48_all_solutions, None, None, False, False) | 244 | print_table( |
| 245 | f, | ||
| 246 | results_h48.h48_all_solutions, | ||
| 247 | None, | ||
| 248 | results_egg.egg_all_solutions, | ||
| 249 | False, | ||
| 250 | False, | ||
| 251 | ) | ||
| 245 | f.write("\n") | 252 | f.write("\n") |
| 246 | f.write( | 253 | f.write( |
| 247 | "Time per cube adjusted for table size " | 254 | "Time per cube adjusted for table size " |
| 248 | "(in seconds \\* GiB, lower is better).\n" | 255 | "(in seconds \\* GiB, lower is better).\n" |
| 249 | ) | 256 | ) |
| 250 | f.write("\n") | 257 | f.write("\n") |
| 251 | print_table(f, results_h48.h48_all_solutions, None, None, True, False) | 258 | print_table( |
| 259 | f, | ||
| 260 | results_h48.h48_all_solutions, | ||
| 261 | None, | ||
| 262 | results_egg.egg_all_solutions, | ||
| 263 | True, | ||
| 264 | False | ||
| 265 | ) | ||
| 266 | f.write("\n") | ||
| 267 | f.write( | ||
| 268 | '<img src="img/17movesallsolutions16threads.png">\n' | ||
| 269 | '<img src="img/18movesallsolutions16threads.png">\n' | ||
| 270 | '<img src="img/19movesallsolutions16threads.png">\n' | ||
| 271 | '<img src="img/20movesallsolutions16threads.png">\n' | ||
| 272 | ) | ||
| 252 | f.write("\n") | 273 | f.write("\n") |
| 253 | f.write("</details>\n") | 274 | f.write("</details>\n") |
| 254 | 275 | ||
| @@ -256,20 +277,33 @@ with open(benchmarks_all_solutions, "w") as f: | |||
| 256 | 277 | ||
| 257 | def plot_comparison(title, hd, vd, ed, key): | 278 | def plot_comparison(title, hd, vd, ed, key): |
| 258 | d = 1 if key == "superflip" else 25 | 279 | d = 1 if key == "superflip" else 25 |
| 259 | h48x = [sizes_h48[m]/(2**30) for m in hd.keys() if key in hd[m]] | ||
| 260 | vcubex = [sizes_vcube[m]/(2**30) for m in vd.keys() if key in vd[m]] | ||
| 261 | eggx = [sizes_egg[m]/(2**30) for m in ed.keys() if key in ed[m]] | ||
| 262 | h48y = [d[key] for _, d in hd.items() if key in d] | ||
| 263 | vcubey = [d[key] for _, d in vd.items() if key in d] | ||
| 264 | eggy = [d[key] for _, d in ed.items() if key in d] | ||
| 265 | 280 | ||
| 266 | plt.clf() | 281 | plt.clf() |
| 267 | plt.title(title) | 282 | plt.title(title) |
| 268 | plt.xlabel("Table size (GiB)") | 283 | plt.xlabel("Table size (GiB)") |
| 269 | plt.ylabel("Time to solve (s / cube)") | 284 | plt.ylabel("Time to solve (s / cube)") |
| 270 | plt.plot(h48x, h48y, "o--", label = "H48") | 285 | |
| 271 | plt.plot(vcubex, vcubey, "o--", label = "vcube") | 286 | if hd is not None: |
| 272 | plt.plot(eggx, eggy, "o--", label = "egg") | 287 | h48x = [ |
| 288 | sizes_h48[m]/(2**30) for m in hd.keys() if key in hd[m] | ||
| 289 | ] | ||
| 290 | h48y = [d[key] for _, d in hd.items() if key in d] | ||
| 291 | plt.plot(h48x, h48y, "o--", label = "H48") | ||
| 292 | |||
| 293 | if vd is not None: | ||
| 294 | vcubex = [ | ||
| 295 | sizes_vcube[m]/(2**30) for m in vd.keys() if key in vd[m] | ||
| 296 | ] | ||
| 297 | vcubey = [d[key] for _, d in vd.items() if key in d] | ||
| 298 | plt.plot(vcubex, vcubey, "o--", label = "vcube") | ||
| 299 | |||
| 300 | if ed is not None: | ||
| 301 | eggx = [ | ||
| 302 | sizes_egg[m]/(2**30) for m in ed.keys() if key in ed[m] | ||
| 303 | ] | ||
| 304 | eggy = [d[key] for _, d in ed.items() if key in d] | ||
| 305 | plt.plot(eggx, eggy, "o--", label = "egg") | ||
| 306 | |||
| 273 | plt.legend(loc = "right") | 307 | plt.legend(loc = "right") |
| 274 | filename = title.replace(" ", "").replace(",", "") + ".png" | 308 | filename = title.replace(" ", "").replace(",", "") + ".png" |
| 275 | plt.savefig(benchmarks_img_dir / filename, dpi=300) | 309 | plt.savefig(benchmarks_img_dir / filename, dpi=300) |
| @@ -278,8 +312,17 @@ def plot_comparison(title, hd, vd, ed, key): | |||
| 278 | rh = results_h48.h48_single_thread | 312 | rh = results_h48.h48_single_thread |
| 279 | rv = results_vcube.vcube_single_thread | 313 | rv = results_vcube.vcube_single_thread |
| 280 | re = results_egg.egg_single_thread | 314 | re = results_egg.egg_single_thread |
| 315 | rhall = results_h48.h48_all_solutions | ||
| 316 | reall = results_egg.egg_all_solutions | ||
| 281 | for m in [17, 18, 19, 20]: | 317 | for m in [17, 18, 19, 20]: |
| 282 | plot_comparison(f"{m} moves 1 thread", rh, rv, re, m) | 318 | plot_comparison(f"{m} moves 1 thread", rh, rv, re, m) |
| 319 | plot_comparison( | ||
| 320 | f"{m} moves all solutions, 16 threads", | ||
| 321 | rhall, | ||
| 322 | None, | ||
| 323 | reall, | ||
| 324 | m, | ||
| 325 | ) | ||
| 283 | 326 | ||
| 284 | def plot_multithread_scatter(title, slow, fast): | 327 | def plot_multithread_scatter(title, slow, fast): |
| 285 | plt.clf() | 328 | plt.clf() |
diff --git a/benchmarks/results_egg.py b/benchmarks/results_egg.py index 3018cf4..57251f2 100644 --- a/benchmarks/results_egg.py +++ b/benchmarks/results_egg.py | |||
| @@ -1,27 +1,36 @@ | |||
| 1 | egg_single_thread = { | 1 | egg_single_thread = { |
| 2 | 6: {17: 5.032832, 18: 38.135722, 19: 204.652846}, | 2 | 6: {17: 5.139311, 18: 39.910660, 19: 215.513895}, |
| 3 | 7: {17: 2.669533, 18: 20.281338, 19: 108.782419}, | 3 | 7: {17: 2.504008, 18: 18.529593, 19: 96.897878}, |
| 4 | 8: {17: 1.651355, 18: 9.714498, 19: 45.383547}, | 4 | 8: {17: 1.549367, 18: 9.064201, 19: 42.325193}, |
| 5 | 9: {17: 0.803654, 18: 4.725768, 19: 22.741144}, | 5 | 9: {17: 0.858265, 18: 5.172505, 19: 24.518997}, |
| 6 | 10: {17: 0.429919, 18: 2.498317, 19: 11.803061, 20: 99.918920, "superflip": 0.234443}, | 6 | 10: {17: 0.417568, 18: 2.459152, 19: 11.623105, 20: 99.011990, "superflip": 0.244296}, |
| 7 | 11: {17: 0.237963, 18: 1.428538, 19: 6.031292, 20: 53.963847, "superflip": 0.138605}, | 7 | 11: {17: 0.238193, 18: 1.432498, 19: 6.021714, 20: 53.487854, "superflip": 0.136739}, |
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | egg_4_threads = { | 10 | egg_4_threads = { |
| 11 | 6: {17: 1.265374, 18: 9.782992, 19: 52.818767}, | 11 | 6: {17: 1.306705, 18: 9.759825, 19: 55.629836}, |
| 12 | 7: {17: 0.688996, 18: 5.239901, 19: 27.651903}, | 12 | 7: {17: 0.656651, 18: 4.781186, 19: 26.968132}, |
| 13 | 8: {17: 0.426688, 18: 2.487043, 19: 11.904544}, | 13 | 8: {17: 0.406570, 18: 2.262452, 19: 10.828606}, |
| 14 | 9: {17: 0.206107, 18: 1.220541, 19: 5.867951}, | 14 | 9: {17: 0.225972, 18: 1.230342, 19: 6.270499}, |
| 15 | 10: {17: 0.110690, 18: 0.662000, 19: 2.965403, 20: 26.244233, "superflip": 0.086182}, | 15 | 10: {17: 0.113393, 18: 0.610004, 19: 2.963694, 20: 25.467137, "superflip": 0.087832}, |
| 16 | 11: {17: 0.063179, 18: 0.366318, 19: 1.552111, 20: 13.738317, "superflip": 0.025594}, | 16 | 11: {17: 0.066650, 18: 0.372158, 19: 1.617824, 20: 13.699318, "superflip": 0.025293}, |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | egg_16_threads = { | 19 | egg_16_threads = { |
| 20 | 6: {17: 0.913331, 18: 7.036477, 19: 38.217758}, | 20 | 6: {17: 0.596467, 18: 4.455692, 19: 24.234698}, |
| 21 | 7: {17: 0.501139, 18: 3.771112, 19: 19.841116}, | 21 | 7: {17: 0.313078, 18: 2.272664, 19: 13.245863}, |
| 22 | 8: {17: 0.301029, 18: 1.764851, 19: 8.205679}, | 22 | 8: {17: 0.200848, 18: 1.084005, 19: 5.266139}, |
| 23 | 9: {17: 0.147238, 18: 0.887650, 19: 4.249228}, | 23 | 9: {17: 0.109538, 18: 0.568547, 19: 2.863034}, |
| 24 | 10: {17: 0.076401, 18: 0.447673, 19: 2.135498, 20: 19.303369, "superflip": 0.038754}, | 24 | 10: {17: 0.060911, 18: 0.303420, 19: 1.449804, 20: 12.498059, "superflip": 0.034263}, |
| 25 | 11: {17: 0.042768, 18: 0.177966, 19: 0.754095, 20: 6.700410, "superflip": 0.016397}, | 25 | 11: {17: 0.037969, 18: 0.194775, 19: 0.793440, 20: 6.893702, "superflip": 0.017957}, |
| 26 | } | ||
| 27 | |||
| 28 | egg_all_solutions = { | ||
| 29 | 6: {17: 2.448883, 18: 31.628611, 19: 373.309154}, | ||
| 30 | 7: {17: 1.096209, 18: 14.131642, 19: 159.427805}, | ||
| 31 | 8: {17: 0.636421, 18: 7.748630, 19: 87.271360}, | ||
| 32 | 9: {17: 0.353850, 18: 4.327602, 19: 49.125814}, | ||
| 33 | 10: {17: 0.187192, 18: 2.222200, 19: 24.909298, 20: 235.468196, "superflip": 31.053940}, | ||
| 34 | 11: {17: 0.107630, 18: 1.242064, 19: 13.417236, 20: 127.044933, "superflip": 15.384209}, | ||
| 26 | } | 35 | } |
| 27 | 36 | ||
diff --git a/benchmarks/run-egg-benchmarks.sh b/benchmarks/run-egg-benchmarks.sh index d29db27..f5e7c32 100755 --- a/benchmarks/run-egg-benchmarks.sh +++ b/benchmarks/run-egg-benchmarks.sh | |||
| @@ -1,30 +1,41 @@ | |||
| 1 | # egg-solver built with: | ||
| 2 | # cargo build --release --locked | ||
| 3 | # mkdir -p tables | ||
| 4 | # target/release/gen $i auto tables/h$i # i from 0 to 11 | ||
| 5 | # target/release/bench tables/h$i tune # i from 0 to 11 | ||
| 6 | |||
| 1 | scr="../nissy-core/benchmarks/scrambles" | 7 | scr="../nissy-core/benchmarks/scrambles" |
| 2 | out="../nissy-core/benchmarks/results_egg.py" | 8 | out="../nissy-core/benchmarks/results_egg.py" |
| 3 | 9 | ||
| 4 | get_solve_time() { | 10 | get_solve_time() { |
| 5 | ./target/release/solve -t "$1" --table "tables/h$2" <"$3" \ | 11 | if [ -n "$4" ]; then |
| 12 | solve_all="./target/release/solve --all-optimal" | ||
| 13 | else | ||
| 14 | solve_all="./target/release/solve" | ||
| 15 | fi | ||
| 16 | $solve_all -t "$1" -c 1 --table "tables/h$2" <"$3" \ | ||
| 6 | | tail -1 | sed 's/.*cubes wall //; s/ wall.*//' | 17 | | tail -1 | sed 's/.*cubes wall //; s/ wall.*//' |
| 7 | } | 18 | } |
| 8 | 19 | ||
| 9 | do_all() { | 20 | do_all() { |
| 10 | echo "doing all $1 $2" | ||
| 11 | t=$1 | 21 | t=$1 |
| 12 | name=$2 | 22 | name=$2 |
| 23 | |||
| 13 | printf '%s = {\n' "$name" >> "$out" | 24 | printf '%s = {\n' "$name" >> "$out" |
| 14 | for i in 6 7 8 9 10 11 ; do | 25 | for i in 6 7 8 9 10 11 ; do |
| 15 | echo "Doing 17 moves for h$i with $t threads..." | 26 | echo "Doing 17 moves for h$i with $t threads..." |
| 16 | t17="$(get_solve_time $t $i "$scr/scrambles-17.txt")" | 27 | t17="$(get_solve_time $t $i "$scr/scrambles-17.txt" "$3")" |
| 17 | echo "Doing 18 moves for h$i with $t threads..." | 28 | echo "Doing 18 moves for h$i with $t threads..." |
| 18 | t18="$(get_solve_time $t $i "$scr/scrambles-18.txt")" | 29 | t18="$(get_solve_time $t $i "$scr/scrambles-18.txt" "$3")" |
| 19 | echo "Doing 19 moves for h$i with $t threads..." | 30 | echo "Doing 19 moves for h$i with $t threads..." |
| 20 | t19="$(get_solve_time $t $i "$scr/scrambles-19.txt")" | 31 | t19="$(get_solve_time $t $i "$scr/scrambles-19.txt" "$3")" |
| 21 | printf '\t%s: {17: %s, 18: %s, 19: %s' $i $t17 $t18 $t19 >> "$out" | 32 | printf '\t%s: {17: %s, 18: %s, 19: %s' $i $t17 $t18 $t19 >> "$out" |
| 22 | if [ "$i" -ge 10 ]; then | 33 | if [ "$i" -ge 10 ]; then |
| 23 | echo "Doing 20 moves for h$i with $t threads..." | 34 | echo "Doing 20 moves for h$i with $t threads..." |
| 24 | t20="$(get_solve_time $t $i "$scr/scrambles-20.txt")" | 35 | t20="$(get_solve_time $t $i "$scr/scrambles-20.txt" "$3")" |
| 25 | printf ', 20: %s' $t20 >> "$out" | 36 | printf ', 20: %s' $t20 >> "$out" |
| 26 | echo "Doing superflip moves for h$i with $t threads..." | 37 | echo "Doing superflip moves for h$i with $t threads..." |
| 27 | tsf="$(get_solve_time $t $i "$scr/superflip.txt")" | 38 | tsf="$(get_solve_time $t $i "$scr/superflip.txt" "$3")" |
| 28 | printf ', "superflip": %s},\n' $tsf >> "$out" | 39 | printf ', "superflip": %s},\n' $tsf >> "$out" |
| 29 | else | 40 | else |
| 30 | printf '},\n' >> "$out" | 41 | printf '},\n' >> "$out" |
| @@ -38,3 +49,4 @@ printf '' > "$out" | |||
| 38 | do_all 1 "egg_single_thread" | 49 | do_all 1 "egg_single_thread" |
| 39 | do_all 4 "egg_4_threads" | 50 | do_all 4 "egg_4_threads" |
| 40 | do_all 16 "egg_16_threads" | 51 | do_all 16 "egg_16_threads" |
| 52 | do_all 16 "egg_all_solutions" "all" | ||
diff --git a/benchmarks/tables_16_threads.md b/benchmarks/tables_16_threads.md index ab5f03a..a2735c1 100644 --- a/benchmarks/tables_16_threads.md +++ b/benchmarks/tables_16_threads.md | |||
| @@ -5,34 +5,34 @@ Time per cube (in seconds, lower is better). | |||
| 5 | 5 | ||
| 6 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| | 6 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 7 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 7 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 8 | |egg h11 |58.0 GiB| 0.00| 0.01| 0.03| 0.27| 0.02| | 8 | |egg h11 |58.0 GiB| 0.00| 0.01| 0.03| 0.28| 0.02| |
| 9 | |H48 h11 |56.5 GiB| 0.02| 0.06| 0.21| 1.16| 1.84| | 9 | |H48 h11 |56.5 GiB| 0.02| 0.06| 0.21| 1.16| 1.84| |
| 10 | |egg h10 |29.0 GiB| 0.00| 0.02| 0.09| 0.77| 0.04| | 10 | |egg h10 |29.0 GiB| 0.00| 0.01| 0.06| 0.50| 0.03| |
| 11 | |H48 h10 |28.3 GiB| 0.03| 0.08| 0.34| 2.24| 4.21| | 11 | |H48 h10 |28.3 GiB| 0.03| 0.08| 0.34| 2.24| 4.21| |
| 12 | |egg h9 |14.5 GiB| 0.01| 0.04| 0.17| | | | 12 | |egg h9 |14.5 GiB| 0.00| 0.02| 0.11| | | |
| 13 | |H48 h9 |14.1 GiB| 0.03| 0.14| 0.64| 4.43| 8.04| | 13 | |H48 h9 |14.1 GiB| 0.03| 0.14| 0.64| 4.43| 8.04| |
| 14 | |egg h8 | 7.2 GiB| 0.01| 0.07| 0.33| | | | 14 | |egg h8 | 7.2 GiB| 0.01| 0.04| 0.21| | | |
| 15 | |H48 h8 | 7.1 GiB| 0.06| 0.30| 1.36| | | | 15 | |H48 h8 | 7.1 GiB| 0.06| 0.30| 1.36| | | |
| 16 | |egg h7 | 3.6 GiB| 0.02| 0.15| 0.79| | | | 16 | |egg h7 | 3.6 GiB| 0.01| 0.09| 0.53| | | |
| 17 | |H48 h7 | 3.5 GiB| 0.08| 0.41| 2.20| | | | 17 | |H48 h7 | 3.5 GiB| 0.08| 0.41| 2.20| | | |
| 18 | |egg h6 | 1.8 GiB| 0.04| 0.28| 1.53| | | | 18 | |egg h6 | 1.8 GiB| 0.02| 0.18| 0.97| | | |
| 19 | |H48 h6 | 1.8 GiB| 0.13| 0.77| 4.37| | | | 19 | |H48 h6 | 1.8 GiB| 0.13| 0.77| 4.37| | | |
| 20 | 20 | ||
| 21 | Speed-up factor (higher is better). | 21 | Speed-up factor (higher is better). |
| 22 | 22 | ||
| 23 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| | 23 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 24 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 24 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 25 | |egg h11 |58.0 GiB| 5.56| 8.03| 8.00| 8.05| 8.45| | 25 | |egg h11 |58.0 GiB| 6.27| 7.35| 7.59| 7.76| 7.61| |
| 26 | |H48 h11 |56.5 GiB| 3.73| 7.32| 8.87| 10.54| 8.35| | 26 | |H48 h11 |56.5 GiB| 3.73| 7.32| 8.87| 10.54| 8.35| |
| 27 | |egg h10 |29.0 GiB| 5.63| 5.58| 5.53| 5.18| 6.05| | 27 | |egg h10 |29.0 GiB| 6.86| 8.10| 8.02| 7.92| 7.13| |
| 28 | |H48 h10 |28.3 GiB| 4.76| 8.60| 9.84| 10.34| 9.03| | 28 | |H48 h10 |28.3 GiB| 4.76| 8.60| 9.84| 10.34| 9.03| |
| 29 | |egg h9 |14.5 GiB| 5.46| 5.32| 5.35| | | | 29 | |egg h9 |14.5 GiB| 7.84| 9.10| 8.56| | | |
| 30 | |H48 h9 |14.1 GiB| 6.34| 10.07| 10.19| | | | 30 | |H48 h9 |14.1 GiB| 6.34| 10.07| 10.19| | | |
| 31 | |egg h8 | 7.2 GiB| 5.49| 5.50| 5.53| | | | 31 | |egg h8 | 7.2 GiB| 7.71| 8.36| 8.04| | | |
| 32 | |H48 h8 | 7.1 GiB| 7.51| 11.36| 10.43| | | | 32 | |H48 h8 | 7.1 GiB| 7.51| 11.36| 10.43| | | |
| 33 | |egg h7 | 3.6 GiB| 5.33| 5.38| 5.48| | | | 33 | |egg h7 | 3.6 GiB| 8.00| 8.15| 7.32| | | |
| 34 | |H48 h7 | 3.5 GiB| 8.21| 11.75| 10.61| | | | 34 | |H48 h7 | 3.5 GiB| 8.21| 11.75| 10.61| | | |
| 35 | |egg h6 | 1.8 GiB| 5.51| 5.42| 5.35| | | | 35 | |egg h6 | 1.8 GiB| 8.62| 8.96| 8.89| | | |
| 36 | |H48 h6 | 1.8 GiB| 9.38| 12.31| 10.80| | | | 36 | |H48 h6 | 1.8 GiB| 9.38| 12.31| 10.80| | | |
| 37 | 37 | ||
| 38 | <img src="img/H48_16_threads_speedup_factor.png"> | 38 | <img src="img/H48_16_threads_speedup_factor.png"> |
diff --git a/benchmarks/tables_1_thread.md b/benchmarks/tables_1_thread.md index bf2e0ab..1f2d7b0 100644 --- a/benchmarks/tables_1_thread.md +++ b/benchmarks/tables_1_thread.md | |||
| @@ -6,21 +6,21 @@ Time per cube (in seconds, lower is better). | |||
| 6 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| | 6 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 7 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 7 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 8 | |vcube 212 |58.2 GiB| 0.11| 0.75| 3.43| 27.28| 19.30| | 8 | |vcube 212 |58.2 GiB| 0.11| 0.75| 3.43| 27.28| 19.30| |
| 9 | |egg h11 |58.0 GiB| 0.01| 0.06| 0.24| 2.16| 0.14| | 9 | |egg h11 |58.0 GiB| 0.01| 0.06| 0.24| 2.14| 0.14| |
| 10 | |H48 h11 |56.5 GiB| 0.08| 0.43| 1.86| 12.20| 15.39| | 10 | |H48 h11 |56.5 GiB| 0.08| 0.43| 1.86| 12.20| 15.39| |
| 11 | |vcube 404 |31.8 GiB| 0.23| 1.24| 6.10| 59.33| 268.26| | 11 | |vcube 404 |31.8 GiB| 0.23| 1.24| 6.10| 59.33| 268.26| |
| 12 | |egg h10 |29.0 GiB| 0.02| 0.10| 0.47| 4.00| 0.23| | 12 | |egg h10 |29.0 GiB| 0.02| 0.10| 0.46| 3.96| 0.24| |
| 13 | |H48 h10 |28.3 GiB| 0.13| 0.69| 3.37| 23.15| 38.00| | 13 | |H48 h10 |28.3 GiB| 0.13| 0.69| 3.37| 23.15| 38.00| |
| 14 | |vcube 308 |21.2 GiB| 0.17| 1.02| 6.20| 58.70| 604.35| | 14 | |vcube 308 |21.2 GiB| 0.17| 1.02| 6.20| 58.70| 604.35| |
| 15 | |egg h9 |14.5 GiB| 0.03| 0.19| 0.91| | | | 15 | |egg h9 |14.5 GiB| 0.03| 0.21| 0.98| | | |
| 16 | |H48 h9 |14.1 GiB| 0.22| 1.43| 6.56| | | | 16 | |H48 h9 |14.1 GiB| 0.22| 1.43| 6.56| | | |
| 17 | |vcube 208 | 7.3 GiB| 0.56| 4.36| 20.58| | | | 17 | |vcube 208 | 7.3 GiB| 0.56| 4.36| 20.58| | | |
| 18 | |egg h8 | 7.2 GiB| 0.07| 0.39| 1.82| | | | 18 | |egg h8 | 7.2 GiB| 0.06| 0.36| 1.69| | | |
| 19 | |H48 h8 | 7.1 GiB| 0.46| 3.43| 14.18| | | | 19 | |H48 h8 | 7.1 GiB| 0.46| 3.43| 14.18| | | |
| 20 | |egg h7 | 3.6 GiB| 0.11| 0.81| 4.35| | | | 20 | |egg h7 | 3.6 GiB| 0.10| 0.74| 3.88| | | |
| 21 | |H48 h7 | 3.5 GiB| 0.63| 4.84| 23.31| | | | 21 | |H48 h7 | 3.5 GiB| 0.63| 4.84| 23.31| | | |
| 22 | |vcube 112 | 2.4 GiB| 0.96| 9.29| 40.52| | | | 22 | |vcube 112 | 2.4 GiB| 0.96| 9.29| 40.52| | | |
| 23 | |egg h6 | 1.8 GiB| 0.20| 1.53| 8.19| | | | 23 | |egg h6 | 1.8 GiB| 0.21| 1.60| 8.62| | | |
| 24 | |H48 h6 | 1.8 GiB| 1.26| 9.51| 47.14| | | | 24 | |H48 h6 | 1.8 GiB| 1.26| 9.51| 47.14| | | |
| 25 | 25 | ||
| 26 | Time per cube adjusted for table size (in seconds \* GiB, lower is better). | 26 | Time per cube adjusted for table size (in seconds \* GiB, lower is better). |
| @@ -28,21 +28,21 @@ Time per cube adjusted for table size (in seconds \* GiB, lower is better). | |||
| 28 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| | 28 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 29 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 29 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 30 | |vcube 212 |58.2 GiB| 6.43| 43.80| 199.38| 1587.43| 1122.73| | 30 | |vcube 212 |58.2 GiB| 6.43| 43.80| 199.38| 1587.43| 1122.73| |
| 31 | |egg h11 |58.0 GiB| 0.55| 3.31| 13.99| 125.17| 8.04| | 31 | |egg h11 |58.0 GiB| 0.55| 3.32| 13.97| 124.06| 7.93| |
| 32 | |H48 h11 |56.5 GiB| 4.56| 24.55| 104.96| 689.22| 869.37| | 32 | |H48 h11 |56.5 GiB| 4.56| 24.55| 104.96| 689.22| 869.37| |
| 33 | |vcube 404 |31.8 GiB| 7.40| 39.47| 194.01| 1887.94| 8535.87| | 33 | |vcube 404 |31.8 GiB| 7.40| 39.47| 194.01| 1887.94| 8535.87| |
| 34 | |egg h10 |29.0 GiB| 0.50| 2.90| 13.69| 115.88| 6.80| | 34 | |egg h10 |29.0 GiB| 0.48| 2.85| 13.48| 114.83| 7.08| |
| 35 | |H48 h10 |28.3 GiB| 3.62| 19.45| 95.15| 654.05| 1073.69| | 35 | |H48 h10 |28.3 GiB| 3.62| 19.45| 95.15| 654.05| 1073.69| |
| 36 | |vcube 308 |21.2 GiB| 3.51| 21.71| 131.50| 1245.26| 12819.94| | 36 | |vcube 308 |21.2 GiB| 3.51| 21.71| 131.50| 1245.26| 12819.94| |
| 37 | |egg h9 |14.5 GiB| 0.47| 2.74| 13.19| | | | 37 | |egg h9 |14.5 GiB| 0.50| 3.00| 14.22| | | |
| 38 | |H48 h9 |14.1 GiB| 3.11| 20.18| 92.68| | | | 38 | |H48 h9 |14.1 GiB| 3.11| 20.18| 92.68| | | |
| 39 | |vcube 208 | 7.3 GiB| 4.08| 31.74| 149.68| | | | 39 | |vcube 208 | 7.3 GiB| 4.08| 31.74| 149.68| | | |
| 40 | |egg h8 | 7.2 GiB| 0.48| 2.82| 13.16| | | | 40 | |egg h8 | 7.2 GiB| 0.45| 2.63| 12.27| | | |
| 41 | |H48 h8 | 7.1 GiB| 3.23| 24.26| 100.15| | | | 41 | |H48 h8 | 7.1 GiB| 3.23| 24.26| 100.15| | | |
| 42 | |egg h7 | 3.6 GiB| 0.39| 2.94| 15.77| | | | 42 | |egg h7 | 3.6 GiB| 0.36| 2.69| 14.05| | | |
| 43 | |H48 h7 | 3.5 GiB| 2.22| 17.12| 82.35| | | | 43 | |H48 h7 | 3.5 GiB| 2.22| 17.12| 82.35| | | |
| 44 | |vcube 112 | 2.4 GiB| 2.33| 22.53| 98.23| | | | 44 | |vcube 112 | 2.4 GiB| 2.33| 22.53| 98.23| | | |
| 45 | |egg h6 | 1.8 GiB| 0.36| 2.76| 14.83| | | | 45 | |egg h6 | 1.8 GiB| 0.37| 2.89| 15.62| | | |
| 46 | |H48 h6 | 1.8 GiB| 2.24| 16.80| 83.33| | | | 46 | |H48 h6 | 1.8 GiB| 2.24| 16.80| 83.33| | | |
| 47 | 47 | ||
| 48 | <img src="img/17moves1thread.png"> | 48 | <img src="img/17moves1thread.png"> |
diff --git a/benchmarks/tables_4_threads.md b/benchmarks/tables_4_threads.md index b1bf9c5..2ca4a39 100644 --- a/benchmarks/tables_4_threads.md +++ b/benchmarks/tables_4_threads.md | |||
| @@ -7,32 +7,32 @@ Time per cube (in seconds, lower is better). | |||
| 7 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 7 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 8 | |egg h11 |58.0 GiB| 0.00| 0.01| 0.06| 0.55| 0.03| | 8 | |egg h11 |58.0 GiB| 0.00| 0.01| 0.06| 0.55| 0.03| |
| 9 | |H48 h11 |56.5 GiB| 0.03| 0.13| 0.50| 3.24| 4.17| | 9 | |H48 h11 |56.5 GiB| 0.03| 0.13| 0.50| 3.24| 4.17| |
| 10 | |egg h10 |29.0 GiB| 0.00| 0.03| 0.12| 1.05| 0.09| | 10 | |egg h10 |29.0 GiB| 0.00| 0.02| 0.12| 1.02| 0.09| |
| 11 | |H48 h10 |28.3 GiB| 0.05| 0.18| 0.90| 6.21| 9.85| | 11 | |H48 h10 |28.3 GiB| 0.05| 0.18| 0.90| 6.21| 9.85| |
| 12 | |egg h9 |14.5 GiB| 0.01| 0.05| 0.23| | | | 12 | |egg h9 |14.5 GiB| 0.01| 0.05| 0.25| | | |
| 13 | |H48 h9 |14.1 GiB| 0.07| 0.39| 1.73| 12.50| 18.97| | 13 | |H48 h9 |14.1 GiB| 0.07| 0.39| 1.73| 12.50| 18.97| |
| 14 | |egg h8 | 7.2 GiB| 0.02| 0.10| 0.48| | | | 14 | |egg h8 | 7.2 GiB| 0.02| 0.09| 0.43| | | |
| 15 | |H48 h8 | 7.1 GiB| 0.13| 0.91| 3.71| | | | 15 | |H48 h8 | 7.1 GiB| 0.13| 0.91| 3.71| | | |
| 16 | |egg h7 | 3.6 GiB| 0.03| 0.21| 1.11| | | | 16 | |egg h7 | 3.6 GiB| 0.03| 0.19| 1.08| | | |
| 17 | |H48 h7 | 3.5 GiB| 0.18| 1.29| 6.19| | | | 17 | |H48 h7 | 3.5 GiB| 0.18| 1.29| 6.19| | | |
| 18 | |egg h6 | 1.8 GiB| 0.05| 0.39| 2.11| | | | 18 | |egg h6 | 1.8 GiB| 0.05| 0.39| 2.23| | | |
| 19 | |H48 h6 | 1.8 GiB| 0.34| 2.48| 12.33| | | | 19 | |H48 h6 | 1.8 GiB| 0.34| 2.48| 12.33| | | |
| 20 | 20 | ||
| 21 | Speed-up factor (higher is better). | 21 | Speed-up factor (higher is better). |
| 22 | 22 | ||
| 23 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| | 23 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 24 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 24 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 25 | |egg h11 |58.0 GiB| 3.77| 3.90| 3.89| 3.93| 5.42| | 25 | |egg h11 |58.0 GiB| 3.57| 3.85| 3.72| 3.90| 5.41| |
| 26 | |H48 h11 |56.5 GiB| 2.51| 3.44| 3.75| 3.77| 3.69| | 26 | |H48 h11 |56.5 GiB| 2.51| 3.44| 3.75| 3.77| 3.69| |
| 27 | |egg h10 |29.0 GiB| 3.88| 3.77| 3.98| 3.81| 2.72| | 27 | |egg h10 |29.0 GiB| 3.68| 4.03| 3.92| 3.89| 2.78| |
| 28 | |H48 h10 |28.3 GiB| 2.79| 3.91| 3.75| 3.73| 3.86| | 28 | |H48 h10 |28.3 GiB| 2.79| 3.91| 3.75| 3.73| 3.86| |
| 29 | |egg h9 |14.5 GiB| 3.90| 3.87| 3.88| | | | 29 | |egg h9 |14.5 GiB| 3.80| 4.20| 3.91| | | |
| 30 | |H48 h9 |14.1 GiB| 3.18| 3.66| 3.79| | | | 30 | |H48 h9 |14.1 GiB| 3.18| 3.66| 3.79| | | |
| 31 | |egg h8 | 7.2 GiB| 3.87| 3.91| 3.81| | | | 31 | |egg h8 | 7.2 GiB| 3.81| 4.01| 3.91| | | |
| 32 | |H48 h8 | 7.1 GiB| 3.48| 3.78| 3.82| | | | 32 | |H48 h8 | 7.1 GiB| 3.48| 3.78| 3.82| | | |
| 33 | |egg h7 | 3.6 GiB| 3.87| 3.87| 3.93| | | | 33 | |egg h7 | 3.6 GiB| 3.81| 3.88| 3.59| | | |
| 34 | |H48 h7 | 3.5 GiB| 3.43| 3.75| 3.77| | | | 34 | |H48 h7 | 3.5 GiB| 3.43| 3.75| 3.77| | | |
| 35 | |egg h6 | 1.8 GiB| 3.98| 3.90| 3.87| | | | 35 | |egg h6 | 1.8 GiB| 3.93| 4.09| 3.87| | | |
| 36 | |H48 h6 | 1.8 GiB| 3.73| 3.84| 3.82| | | | 36 | |H48 h6 | 1.8 GiB| 3.73| 3.84| 3.82| | | |
| 37 | 37 | ||
| 38 | <img src="img/H48_4_threads_speedup_factor.png"> | 38 | <img src="img/H48_4_threads_speedup_factor.png"> |
diff --git a/benchmarks/tables_all_solutions.md b/benchmarks/tables_all_solutions.md index 6535b60..e9923e7 100644 --- a/benchmarks/tables_all_solutions.md +++ b/benchmarks/tables_all_solutions.md | |||
| @@ -5,22 +5,39 @@ Time per cube (in seconds, lower is better). | |||
| 5 | 5 | ||
| 6 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| | 6 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 7 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 7 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 8 | |egg h11 |58.0 GiB| 0.00| 0.05| 0.54| 5.08| 15.38| | ||
| 8 | |H48 h11 |56.5 GiB| 0.04| 0.24| 1.88| 3.88| 1.86| | 9 | |H48 h11 |56.5 GiB| 0.04| 0.24| 1.88| 3.88| 1.86| |
| 10 | |egg h10 |29.0 GiB| 0.01| 0.09| 1.00| 9.42| 31.05| | ||
| 9 | |H48 h10 |28.3 GiB| 0.05| 0.39| 3.51| 7.54| 4.29| | 11 | |H48 h10 |28.3 GiB| 0.05| 0.39| 3.51| 7.54| 4.29| |
| 12 | |egg h9 |14.5 GiB| 0.01| 0.17| 1.97| | | | ||
| 10 | |H48 h9 |14.1 GiB| 0.08| 0.73| 6.92| | | | 13 | |H48 h9 |14.1 GiB| 0.08| 0.73| 6.92| | | |
| 14 | |egg h8 | 7.2 GiB| 0.03| 0.31| 3.49| | | | ||
| 11 | |H48 h8 | 7.1 GiB| 0.16| 1.54| 14.78| | | | 15 | |H48 h8 | 7.1 GiB| 0.16| 1.54| 14.78| | | |
| 16 | |egg h7 | 3.6 GiB| 0.04| 0.57| 6.38| | | | ||
| 12 | |H48 h7 | 3.5 GiB| 0.22| 2.37| 25.35| | | | 17 | |H48 h7 | 3.5 GiB| 0.22| 2.37| 25.35| | | |
| 18 | |egg h6 | 1.8 GiB| 0.10| 1.27| 14.93| | | | ||
| 13 | |H48 h6 | 1.8 GiB| 0.40| 4.58| 50.17| | | | 19 | |H48 h6 | 1.8 GiB| 0.40| 4.58| 50.17| | | |
| 14 | 20 | ||
| 15 | Time per cube adjusted for table size (in seconds \* GiB, lower is better). | 21 | Time per cube adjusted for table size (in seconds \* GiB, lower is better). |
| 16 | 22 | ||
| 17 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| | 23 | |Solver|Size|17 moves|18 moves|19 moves|20 moves|Superflip| |
| 18 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| | 24 | |:-----|:---|-------:|-------:|-------:|-------:|--------:| |
| 25 | |egg h11 |58.0 GiB| 0.25| 2.88| 31.12| 294.67| 892.07| | ||
| 19 | |H48 h11 |56.5 GiB| 2.00| 13.40| 106.21| 219.43| 105.10| | 26 | |H48 h11 |56.5 GiB| 2.00| 13.40| 106.21| 219.43| 105.10| |
| 27 | |egg h10 |29.0 GiB| 0.22| 2.58| 28.89| 273.08| 900.34| | ||
| 20 | |H48 h10 |28.3 GiB| 1.45| 11.13| 99.17| 212.94| 121.20| | 28 | |H48 h10 |28.3 GiB| 1.45| 11.13| 99.17| 212.94| 121.20| |
| 29 | |egg h9 |14.5 GiB| 0.21| 2.51| 28.49| | | | ||
| 21 | |H48 h9 |14.1 GiB| 1.13| 10.25| 97.80| | | | 30 | |H48 h9 |14.1 GiB| 1.13| 10.25| 97.80| | | |
| 31 | |egg h8 | 7.2 GiB| 0.18| 2.25| 25.30| | | | ||
| 22 | |H48 h8 | 7.1 GiB| 1.10| 10.85| 104.41| | | | 32 | |H48 h8 | 7.1 GiB| 1.10| 10.85| 104.41| | | |
| 33 | |egg h7 | 3.6 GiB| 0.16| 2.05| 23.11| | | | ||
| 23 | |H48 h7 | 3.5 GiB| 0.79| 8.38| 89.57| | | | 34 | |H48 h7 | 3.5 GiB| 0.79| 8.38| 89.57| | | |
| 35 | |egg h6 | 1.8 GiB| 0.18| 2.29| 27.06| | | | ||
| 24 | |H48 h6 | 1.8 GiB| 0.71| 8.10| 88.68| | | | 36 | |H48 h6 | 1.8 GiB| 0.71| 8.10| 88.68| | | |
| 25 | 37 | ||
| 38 | <img src="img/17movesallsolutions16threads.png"> | ||
| 39 | <img src="img/18movesallsolutions16threads.png"> | ||
| 40 | <img src="img/19movesallsolutions16threads.png"> | ||
| 41 | <img src="img/20movesallsolutions16threads.png"> | ||
| 42 | |||
| 26 | </details> | 43 | </details> |
