diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2026-01-12 18:09:43 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2026-01-12 18:09:43 +0100 |
| commit | 9a013b7c68f94e6be0fe8748c9012a441fe0273f (patch) | |
| tree | d6bb6de992eace566d033d0824c03da89cf7b9cb /src/solvers/solutions.h | |
| parent | 83f6533c384a617181e818d1941b08e40aa40b7d (diff) | |
| download | nissy-core-9a013b7c68f94e6be0fe8748c9012a441fe0273f.tar.gz nissy-core-9a013b7c68f94e6be0fe8748c9012a441fe0273f.zip | |
Improve performance of H48 solver with prefetching
With this commit we re-structure how the node expansion in the
H48 solution search works to allow prefetching of pruning values,
showing performance improvements in the range of 30-45% on x86,
depending on table size and solution length.
A small bug fix related to appending solutions is included in this commit.
Diffstat (limited to 'src/solvers/solutions.h')
| -rw-r--r-- | src/solvers/solutions.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/solvers/solutions.h b/src/solvers/solutions.h index d92d5ad..8817348 100644 --- a/src/solvers/solutions.h +++ b/src/solvers/solutions.h | |||
| @@ -108,7 +108,7 @@ last_solution_is_duplicate(const solution_list_t l[static 1]) | |||
| 108 | j--; | 108 | j--; |
| 109 | for (i = l->used-2; l->buf[i] == l->buf[j]; i--, j--) { | 109 | for (i = l->used-2; l->buf[i] == l->buf[j]; i--, j--) { |
| 110 | if (l->buf[i-1] == '\n') { | 110 | if (l->buf[i-1] == '\n') { |
| 111 | if (l->buf[j-1] == '\n' || j == 0) | 111 | if (j == 0 || l->buf[j-1] == '\n') |
| 112 | return true; | 112 | return true; |
| 113 | else break; | 113 | else break; |
| 114 | } | 114 | } |
