From 97ab74bbd0b455f1e36807cdaf610c523722da38 Mon Sep 17 00:00:00 2001 From: Miguel M Date: Sat, 3 Jun 2023 19:08:21 +0100 Subject: [PATCH] misc: check if permutations can be skipped at any point --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.c b/src/main.c index 6186b26..ca4fb8f 100644 --- a/src/main.c +++ b/src/main.c @@ -302,6 +302,10 @@ int main(int argc, char *argv[]) { while (!a_out_perms[a_out - 1].exhausted) { ResetConditionalPermutations(b_out_perms, b_out); while (!b_out_perms[b_out - 1].exhausted) { + if (seen[lhs_i]) { + goto skip_permutations; + } + // Compare the two rows FromCgToP(a_out, b_out, a_in, b_in, rhs, p_buf, a_in_perm.permutation, b_in_perm.permutation,