Jippity has no clue on how to make the code run meaningfully faster. what it produced is micro-optimized and less readable. for 1 million runs using the default arguments, my code runs in 940ms, jippity's version runs in 874ms. geppato can not generate a significantly faster solution, because none is in its training set.
Even Jippity's suggestions to prune the search space do not actually work, it's more costly to check Manhattan distance per iteration than the dead ends it avoids. Geppato's version is actually slower for larger grids, just changing from 3x3 to 6x6 and 100 runs, mine takes 14.1s while Geppato's version took 18.8s.
Jippity has no clue on how to make the code run meaningfully faster. what it produced is micro-optimized and less readable. for 1 million runs using the default arguments, my code runs in 940ms, jippity's version runs in 874ms. geppato can not generate a significantly faster solution, because none is in its training set.
Even Jippity's suggestions to prune the search space do not actually work, it's more costly to check Manhattan distance per iteration than the dead ends it avoids. Geppato's version is actually slower for larger grids, just changing from 3x3 to 6x6 and 100 runs, mine takes 14.1s while Geppato's version took 18.8s.