diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-13 20:40:18 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-13 20:40:18 +0100 |
| commit | 1215648b1ba3c592bd9d97b871349673d1702e44 (patch) | |
| tree | 7dc73a013c76b0cb0976e98d5e07902a0045363f /src/utils.h | |
| parent | 296f35b7ed4ea3177c520f28176f44d6ad47d76d (diff) | |
| download | nissy-1215648b1ba3c592bd9d97b871349673d1702e44.tar.gz nissy-1215648b1ba3c592bd9d97b871349673d1702e44.zip | |
Faster optimal solver.
This is a pretty big one, but unfortunately performance only improved by about 5%.
I implemented one of the main ideas of nxopt, that is switching to the
inverse scramble on the fly if it gives a lower branching factor.
On the one hand it makes sense that it does not have such a huge impact, since
it only rarely happens that we do have a lower branching factor on inverse, but
on the other hand I am quite sad that the improvement is barely noticeable :-(
Maybe the problem is that I have introduced a lot of new overhead and I can improve
that in the future. Or maybe I am just overlooking something stupid.
Diffstat (limited to 'src/utils.h')
| -rw-r--r-- | src/utils.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils.h b/src/utils.h index 80c33ae..9ba228d 100644 --- a/src/utils.h +++ b/src/utils.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define UTILS_H | 2 | #define UTILS_H |
| 3 | 3 | ||
| 4 | #include <stdbool.h> | 4 | #include <stdbool.h> |
| 5 | #include <stdint.h> | ||
| 5 | #include <stdlib.h> | 6 | #include <stdlib.h> |
| 6 | #include <string.h> | 7 | #include <string.h> |
| 7 | 8 | ||
| @@ -37,5 +38,6 @@ int powint(int a, int b); | |||
| 37 | int subset_to_index(int *a, int n, int k); | 38 | int subset_to_index(int *a, int n, int k); |
| 38 | void sum_arrays_mod(int *src, int *dst, int n, int m); | 39 | void sum_arrays_mod(int *src, int *dst, int n, int m); |
| 39 | void swap(int *a, int *b); | 40 | void swap(int *a, int *b); |
| 41 | void swapu64(uint64_t *a, uint64_t *b); | ||
| 40 | 42 | ||
| 41 | #endif | 43 | #endif |
