Take advantage of the fact that tagged is sorted

This commit is contained in:
Michael Walker 2015-07-21 14:38:00 +01:00
parent d4b1ea8bc5
commit 3c1dadffa6

View File

@ -111,8 +111,8 @@ findBacktrack backtrack = go [] [] where
go _ bs _ _ = bs
doBacktrack allThreads enabledThreads bs =
let tagged = zip [0..] $ tidTag (fst . _decision) 0 bs
idxs = [ (maximum is, u)
let tagged = reverse . zip [0..] $ tidTag (fst . _decision) 0 bs
idxs = [ (head is, u)
| (u, n) <- enabledThreads
, v <- allThreads
, u /= v