Re:Brute-forcing a seemingly simple number puzzle
by taeric on Wednesday December 05, 2018 @03:36PM
(#18612256)
Backtracking doesn't require a mutable anything, per se. Just the ability to get back to where you were.
Now, it can be somewhat easily reasoned that a mutable board can more quickly let you go back to previous settings, since you could potentially lose the GC steps of the immutable version.
Of course, the immutable is more easily reasoned for parallelizing, since you can just throw paths to different workers without them stepping on each other.
Re:Brute-forcing a seemingly simple number puzzle
by kevinwang on Wednesday December 05, 2018 @08:46PM
(#18614677)
My argument is that the version with a single mutable board would be 100x100=10000 times faster, since you won't need to make a new array for every move
Now, it can be somewhat easily reasoned that a mutable board can more quickly let you go back to previous settings, since you could potentially lose the GC steps of the immutable version.
Of course, the immutable is more easily reasoned for parallelizing, since you can just throw paths to different workers without them stepping on each other.
So, tradeoffs.