
Dear Haskell Cafe,
I am working on a solver for Slitherlink puzzles in Haskell. Today I am
completely puzzled that a small change I made had a huge performance
impact. I thought the change to be merely cosmetic to make a function a
little more elegant and the code more readable. But this change slowed
down my program by a factor of 100!
I would greatly appreciate advice from experienced Haskellers why this
has happened. The program is hosted on github; this is the direct link
to the change with unexpected outcome:
https://github.com/ctbo/slitherlink/commit/b6f58699258ef68ddee21a1346bd18446...
The program itself isn't commented at all, but I have written a sketch
of how it works in the wiki:
https://github.com/ctbo/slitherlink/wiki/How-it-works
While I am at it:
I would also appreciate any advice you might have on the programming
style in general. I am relatively new to Haskell and this is my first
nontrivial program. So any suggestions for improvements are welcome!
Thanks for your time,
--
Harald Bögeholz