chiark
/
gitweb
/
~ianmdlvl
/
matchsticks-search.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4612c66
)
move minham check earlier; this avoids some printing etc
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 9 Mar 2014 13:18:09 +0000
(13:18 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 9 Mar 2014 13:18:10 +0000
(13:18 +0000)
apparent speedup of -j4 9 7 on zealot is about 10%
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index 97b4bbbcc2071972bbc5ce38d7e1b09ef2bc6479..c5a49918869d9c8c1b07d865353cb856ece2c61f 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-458,13
+458,6
@@
static void optimise(bool doprint) {
if (!ok)
goto out;
- for (j=0; j<m; j++)
- if (weight[j] < 2) {
- PRINTF(" nominham");
- goto out;
- }
-
-
/*
* We formulate our problem as an LP problem as follows.
* In this file "n" and "m" are the matchstick numbers.
@@
-635,6
+628,10
@@
static void iterate_recurse(int i, AdjWord min) {
AdjWord jbit;
if (i >= n) {
+ for (j=0; j<m; j++)
+ if (weight[j] < 2)
+ return;
+
printcounter++;
optimise(!(printcounter & 0xfff));
return;